abhishekagarwal87 commented on code in PR #15451:
URL: https://github.com/apache/druid/pull/15451#discussion_r1409265469
##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/ArrayOverlapOperatorConversion.java:
##########
@@ -149,6 +153,42 @@ public DimFilter toDruidFilter(
);
}
}
+
+ // if the input is a direct array column, we can use sweet array filter
Review Comment:
nit
```suggestion
// if the input is a direct array column, we can use sweet array
contains filter
```
##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/ArrayOverlapOperatorConversion.java:
##########
@@ -149,6 +153,42 @@ public DimFilter toDruidFilter(
);
}
}
+
+ // if the input is a direct array column, we can use sweet array filter
+ if (simpleExtractionExpr.isDirectColumnAccess() &&
simpleExtractionExpr.isArray()) {
+ // To convert this expression filter into an OR of ArrayContainsElement
filters, we need to extract all array
+ // elements.
+ if (expr.isLiteral()) {
Review Comment:
what will happen if its an empty array?
--
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]