Skip to content

Commit

Permalink
Merge pull request #1054 from zhicwu/develop
Browse files Browse the repository at this point in the history
Fix issue of parsing SimpleAggregateFunction column
  • Loading branch information
zhicwu authored Aug 29, 2022
2 parents 69c8961 + 242b95a commit 6e73daa
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ protected static int readColumn(String args, int startIndex, int len, String nam
List<ClickHouseColumn> nestedColumns = new LinkedList<>();
for (String p : params) {
if (isFirst) {
int pIndex = p.indexOf('(');
aggFunc = ClickHouseAggregateFunction.of(pIndex > 0 ? p.substring(0, pIndex) : p);
if (matchedKeyword == KEYWORD_AGGREGATE_FUNCTION) {
int pIndex = p.indexOf('(');
aggFunc = ClickHouseAggregateFunction.of(pIndex > 0 ? p.substring(0, pIndex) : p);
}
isFirst = false;
} else {
nestedColumns.add(ClickHouseColumn.of("", p));
Expand Down

0 comments on commit 6e73daa

Please sign in to comment.