xiangfu0 commented on code in PR #20001:
URL: https://github.com/apache/pinot/pull/20001#discussion_r4386350482
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/validation/ArrayToMvValidationVisitor.java:
##########
@@ -172,6 +174,43 @@ public Void visitUnnest(UnnestNode node, Boolean
isIntermediateStage) {
return null;
}
+ /// Comparing a multi-value column to a value (e.g. `mvCol = 'a'`) is
planned as a comparison on `ARRAY_TO_MV`. As
+ /// the query does not contain `ARRAY_TO_MV` in this case, the error
explains the comparison instead.
+ private QueryException arrayToMvNotSupported(String location, List<? extends
RexExpression> expressions,
Review Comment:
Small consistency gap: the FILTER/JOIN/PROJECT paths now route through this
helper and get the friendly "Comparing a multi-value column to a value..."
message, but `visitAggregate` and `visitWindow` still throw the old generic
"Function 'ArrayToMv' is not supported in ... Stage" text. An MV comparison
that surfaces inside an aggregate or window call (e.g. in the intermediate
stage) would get the less-helpful message. Non-blocking, but worth routing
those two through `arrayToMvNotSupported` too for consistency.
--
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]