jihoonson commented on a change in pull request #10312:
URL: https://github.com/apache/druid/pull/10312#discussion_r475353053
##########
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:
Nice finding, but this can lead to incorrect result in default mode
since `null` will be always added no matter whether an empty string is in
`values` or not.
----------------------------------------------------------------
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]