Skip to content

Commit

Permalink
Fix Hql-Queries using CEILING and LN.
Browse files Browse the repository at this point in the history
Closes #3711
  • Loading branch information
coderesting authored and mp911de committed Dec 11, 2024
1 parent f4e2fa7 commit 2eaa6d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
}
Expand Down Expand Up @@ -1133,6 +1133,7 @@ reservedWord
| BY
| CASE
| CAST
| CEILING
| COLLATE
| CONTAINS
| COUNT
Expand Down Expand Up @@ -1206,6 +1207,7 @@ reservedWord
| LIMIT
| LIST
| LISTAGG
| LN
| LOCAL
| LOCAL_DATE
| LOCAL_DATETIME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* @author Greg Turnquist
* @author Christoph Strobl
* @author Mark Paluch
* @author Mark Paluch, Yannick Brandt
* @since 3.1
*/
class HqlQueryRendererTests {
Expand Down Expand Up @@ -1509,6 +1509,16 @@ select round(count(ri) * 100 / max(ri.receipt.positions), 0) as perc
});
}

@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() {

Expand Down

0 comments on commit 2eaa6d5

Please sign in to comment.