Fix hql rendering for signed numeric literals.
This commit fixes an issue where an extra space is added between the sign and the actual value of signed numerics. Closes: #3342 Original Pull Request: #3343
This commit is contained in:
committed by
Christoph Strobl
parent
8745b46dc7
commit
6f8f63a74a
@@ -1289,7 +1289,7 @@ class HqlQueryRenderer extends HqlBaseVisitor<List<JpaQueryParsingToken>> {
|
||||
|
||||
List<JpaQueryParsingToken> tokens = new ArrayList<>();
|
||||
|
||||
tokens.add(new JpaQueryParsingToken(ctx.op));
|
||||
tokens.add(new JpaQueryParsingToken(ctx.op, false));
|
||||
tokens.addAll(visit(ctx.numericLiteral()));
|
||||
|
||||
return tokens;
|
||||
|
||||
@@ -1633,4 +1633,9 @@ class HqlQueryRendererTests {
|
||||
group by extract(epoch from departureTime)
|
||||
""");
|
||||
}
|
||||
|
||||
@Test
|
||||
void queryWithSignedNumericLiteralShouldWork() {
|
||||
assertQuery("select -1");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user