@@ -329,8 +329,8 @@ public QueryTokenStream visitEntityWithJoins(HqlParser.EntityWithJoinsContext ct
329329
330330 QueryRendererBuilder builder = QueryRenderer .builder ();
331331
332- builder .appendExpression (visit (ctx .fromRoot ()));
333- builder .appendInline (QueryTokenStream .concat (ctx .joinSpecifier (), this ::visit , TOKEN_SPACE ));
332+ builder .appendInline (visit (ctx .fromRoot ()));
333+ builder .appendInline (QueryTokenStream .concat (ctx .joinSpecifier (), this ::visit , EMPTY_TOKEN ));
334334
335335 return builder ;
336336 }
@@ -389,6 +389,7 @@ public QueryTokenStream visitJoin(HqlParser.JoinContext ctx) {
389389
390390 QueryRendererBuilder builder = QueryRenderer .builder ();
391391
392+ builder .append (TOKEN_SPACE );
392393 builder .append (visit (ctx .joinType ()));
393394 builder .append (QueryTokens .expression (ctx .JOIN ()));
394395
@@ -746,7 +747,7 @@ public QueryTokenStream visitOffsetClause(HqlParser.OffsetClauseContext ctx) {
746747 QueryRendererBuilder builder = QueryRenderer .builder ();
747748
748749 builder .append (QueryTokens .expression (ctx .OFFSET ()));
749- builder .append (visit (ctx .parameterOrIntegerLiteral ()));
750+ builder .appendExpression (visit (ctx .parameterOrIntegerLiteral ()));
750751
751752 if (ctx .ROW () != null ) {
752753 builder .append (QueryTokens .expression (ctx .ROW ()));
@@ -3377,7 +3378,7 @@ public QueryTokenStream visitEveryFunction(HqlParser.EveryFunctionContext ctx) {
33773378 builder .append (TOKEN_CLOSE_PAREN );
33783379 } else {
33793380
3380- builder .appendExpression (visit (ctx .collectionQuantifier ()));
3381+ builder .append (visit (ctx .collectionQuantifier ()));
33813382
33823383 builder .append (TOKEN_OPEN_PAREN );
33833384 builder .appendInline (visit (ctx .simplePath ()));
@@ -3412,7 +3413,7 @@ public QueryTokenStream visitAnyFunction(HqlParser.AnyFunctionContext ctx) {
34123413 builder .append (TOKEN_CLOSE_PAREN );
34133414 } else {
34143415
3415- builder .appendExpression (visit (ctx .collectionQuantifier ()));
3416+ builder .append (visit (ctx .collectionQuantifier ()));
34163417
34173418 builder .append (TOKEN_OPEN_PAREN );
34183419 builder .appendInline (visit (ctx .simplePath ()));
@@ -3801,9 +3802,9 @@ public QueryTokenStream visitInList(HqlParser.InListContext ctx) {
38013802 if (ctx .simplePath () != null ) {
38023803
38033804 if (ctx .ELEMENTS () != null ) {
3804- builder .append (QueryTokens .expression (ctx .ELEMENTS ()));
3805+ builder .append (QueryTokens .token (ctx .ELEMENTS ()));
38053806 } else if (ctx .INDICES () != null ) {
3806- builder .append (QueryTokens .expression (ctx .INDICES ()));
3807+ builder .append (QueryTokens .token (ctx .INDICES ()));
38073808 }
38083809
38093810 builder .append (TOKEN_OPEN_PAREN );
@@ -3836,9 +3837,9 @@ public QueryTokenStream visitExistsExpression(HqlParser.ExistsExpressionContext
38363837 builder .append (QueryTokens .expression (ctx .EXISTS ()));
38373838
38383839 if (ctx .ELEMENTS () != null ) {
3839- builder .append (QueryTokens .expression (ctx .ELEMENTS ()));
3840+ builder .append (QueryTokens .token (ctx .ELEMENTS ()));
38403841 } else if (ctx .INDICES () != null ) {
3841- builder .append (QueryTokens .expression (ctx .INDICES ()));
3842+ builder .append (QueryTokens .token (ctx .INDICES ()));
38423843 }
38433844
38443845 builder .append (TOKEN_OPEN_PAREN );
0 commit comments