walterddr commented on code in PR #11117:
URL: https://github.com/apache/pinot/pull/11117#discussion_r1274152585


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/parser/CalciteRexExpressionParser.java:
##########
@@ -199,6 +203,12 @@ private static Expression 
compileFunctionExpression(RexExpression.FunctionCall r
         return compileOrExpression(rexCall, pinotQuery);
       case OTHER_FUNCTION:
         functionName = rexCall.getFunctionName();
+        // Special handle for leaf stage multi-value columns, as the default 
behavior for filter and group by is not
+        // sql standard, so need to use `array_to_mv` to convert the array to 
v1 multi-value column for behavior
+        // consistency meanwhile not violating the sql standard.
+        if (ARRAY_TO_MV_ALIAS.contains(functionName)) {

Review Comment:
   Let's canonicalized and just do `ARRAY_TO_MV`



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/parser/CalciteRexExpressionParser.java:
##########
@@ -50,6 +52,8 @@
 public class CalciteRexExpressionParser {
   private static final Logger LOGGER = 
LoggerFactory.getLogger(CalciteRexExpressionParser.class);
   private static final Map<String, String> CANONICAL_NAME_TO_SPECIAL_KEY_MAP;
+  private static final Set<String> ARRAY_TO_MV_ALIAS =

Review Comment:
   Do we need this many variance? Once we have unnest this should be removed 
right?



-- 
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]

Reply via email to