Jackie-Jiang commented on code in PR #11171:
URL: https://github.com/apache/pinot/pull/11171#discussion_r1273962510
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/parser/CalciteRexExpressionParser.java:
##########
@@ -210,6 +210,10 @@ private static Expression
compileFunctionExpression(RexExpression.FunctionCall r
for (RexExpression childNode : childNodes) {
operands.add(toExpression(childNode, pinotQuery));
}
+ // for COUNT, add a literal val 1 to operand list b/c V1 doesn't handle
empty operand functions.
+ if (functionKind == SqlKind.COUNT && operands.isEmpty()) {
+ operands.add(RequestUtils.getLiteralExpression(1));
Review Comment:
To keep the existing V1 behavior, let's put
`RequestUtils.getIdentifierExpression("*")`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]