suneet-s commented on a change in pull request #10312:
URL: https://github.com/apache/druid/pull/10312#discussion_r475785013
##########
File path:
processing/src/main/java/org/apache/druid/query/filter/InDimFilter.java
##########
@@ -143,10 +142,11 @@ private InDimFilter(
// The values set can be huge. Try to avoid copying the set if possible.
// Note that we may still need to copy values to a list for caching. See
getCacheKey().
- if ((NullHandling.sqlCompatible() ||
values.stream().noneMatch(NullHandling::needsEmptyToNull))) {
+ if (NullHandling.sqlCompatible() || !values.remove("")) {
this.values = values;
} else {
- this.values =
values.stream().map(NullHandling::emptyToNullIfNeeded).collect(Collectors.toSet());
+ values.add(null);
Review comment:
I've re-written the if statement to hopefully be easier to follow.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]