HHH-16655 Fix parse error for HQL window frames
This commit is contained in:
parent
4bb0740010
commit
023e08581d
|
@ -1211,9 +1211,9 @@ frameClause
|
||||||
* The start of the window content
|
* The start of the window content
|
||||||
*/
|
*/
|
||||||
frameStart
|
frameStart
|
||||||
: UNBOUNDED PRECEDING
|
: CURRENT ROW
|
||||||
|
| UNBOUNDED PRECEDING
|
||||||
| expression PRECEDING
|
| expression PRECEDING
|
||||||
| CURRENT ROW
|
|
||||||
| expression FOLLOWING
|
| expression FOLLOWING
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -1221,10 +1221,10 @@ frameStart
|
||||||
* The end of the window content
|
* The end of the window content
|
||||||
*/
|
*/
|
||||||
frameEnd
|
frameEnd
|
||||||
: expression PRECEDING
|
: CURRENT ROW
|
||||||
| CURRENT ROW
|
|
||||||
| expression FOLLOWING
|
|
||||||
| UNBOUNDED FOLLOWING
|
| UNBOUNDED FOLLOWING
|
||||||
|
| expression PRECEDING
|
||||||
|
| expression FOLLOWING
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -211,4 +211,15 @@ public class WindowFunctionTest {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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…
Reference in New Issue