Skip to content

Commit

Permalink
Fix grouped query parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed Oct 11, 2024
1 parent 7cdba9a commit 1b37c30
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ public String visitUnquotedLiteralExpression(KqlBaseParser.UnquotedLiteralExpres
.collect(Collectors.joining(UNQUOTED_LITERAL_TERM_DELIMITER));
}

protected String aggregateResult(String aggregate, String nextResult) {
if (aggregate == null && nextResult == null) {
return "";
}

if (aggregate == null) {
return nextResult;
}

if (nextResult == null) {
return aggregate;
}

return String.join(UNQUOTED_LITERAL_TERM_DELIMITER, aggregate, nextResult);
}

private String unescapeQuotedString(ParserRuleContext ctx, String inputText) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < inputText.length();) {
Expand Down

0 comments on commit 1b37c30

Please sign in to comment.