clintropolis commented on code in PR #15058:
URL: https://github.com/apache/druid/pull/15058#discussion_r1348466664
##########
processing/src/main/java/org/apache/druid/segment/DimensionSelector.java:
##########
@@ -261,13 +262,17 @@ public IndexedInts getRow(int offset)
@Override
public ValueMatcher makeValueMatcher(@Nullable String value)
{
- return BooleanValueMatcher.of(value == null);
+ if (NullHandling.isNullOrEquivalent(value)) {
+ return ValueMatchers.allTrue();
+ }
+ return ValueMatchers.allUnknown();
}
@Override
- public ValueMatcher makeValueMatcher(Predicate<String> predicate)
+ public ValueMatcher makeValueMatcher(DruidPredicateFactory
predicateFactory)
{
- return BooleanValueMatcher.of(predicate.apply(null));
+ final Predicate<String> predicate =
predicateFactory.makeStringPredicate();
+ return predicate.apply(null) ? ValueMatchers.allTrue() :
ValueMatchers.allUnknown();
Review Comment:
hmm, good question, I guess we technically should do ValueMatchers.allFalse
if isNullInputUnknown is false and the predicate doesn't match null, will
update and add test (if test agrees that is what should be happening)
--
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]