mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
HHH-16655 Fix parse error for HQL window frames
This commit is contained in:
parent
f49bce8bde
commit
7f5ebc207e
@ -1211,9 +1211,9 @@ frameClause
|
||||
* The start of the window content
|
||||
*/
|
||||
frameStart
|
||||
: UNBOUNDED PRECEDING
|
||||
: CURRENT ROW
|
||||
| UNBOUNDED PRECEDING
|
||||
| expression PRECEDING
|
||||
| CURRENT ROW
|
||||
| expression FOLLOWING
|
||||
;
|
||||
|
||||
@ -1221,10 +1221,10 @@ frameStart
|
||||
* The end of the window content
|
||||
*/
|
||||
frameEnd
|
||||
: expression PRECEDING
|
||||
| CURRENT ROW
|
||||
| expression FOLLOWING
|
||||
: CURRENT ROW
|
||||
| UNBOUNDED FOLLOWING
|
||||
| expression PRECEDING
|
||||
| expression FOLLOWING
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -211,4 +211,15 @@ public void testOrderByAndPositional(SessionFactoryScope scope) {
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Test
|
||||
@Jira( "https://hibernate.atlassian.net/browse/HHH-16655" )
|
||||
public void testParseWindowFrame(SessionFactoryScope scope) {
|
||||
scope.inTransaction( session -> {
|
||||
session.createQuery(
|
||||
"select rank() over (order by theInt rows between current row and unbounded following) from EntityOfBasics",
|
||||
Long.class
|
||||
);
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user