Fix Hql-Queries using CEILING and LN.

Closes #3711
This commit is contained in:
Yannick Brandt
2024-12-11 11:21:41 +01:00
committed by Mark Paluch
parent f4e2fa7f9a
commit 2eaa6d577d
2 changed files with 14 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ grammar Hql;
* management of complex rules in the generated Visitor. Finally, there are labels applied to rule elements (op=('+'|'-')
* to simplify the processing.
*
* @author Greg Turnquist
* @author Greg Turnquist, Yannick Brandt
* @since 3.1
*/
}
@@ -1133,6 +1133,7 @@ reservedWord
| BY
| CASE
| CAST
| CEILING
| COLLATE
| CONTAINS
| COUNT
@@ -1206,6 +1207,7 @@ reservedWord
| LIMIT
| LIST
| LISTAGG
| LN
| LOCAL
| LOCAL_DATE
| LOCAL_DATETIME

View File

@@ -37,7 +37,7 @@ import org.junit.jupiter.params.provider.ValueSource;
*
* @author Greg Turnquist
* @author Christoph Strobl
* @author Mark Paluch
* @author Mark Paluch, Yannick Brandt
* @since 3.1
*/
class HqlQueryRendererTests {
@@ -1509,6 +1509,16 @@ class HqlQueryRendererTests {
});
}
@Test
void ceilingFunctionShouldWork() {
assertQuery("select ceiling(1.5) from Element a");
}
@Test
void lnFunctionSouldWork() {
assertQuery("select ln(7.5) from Element a");
}
@Test // GH-2981
void cteWithClauseShouldWork() {