clintropolis commented on a change in pull request #10613: URL: https://github.com/apache/druid/pull/10613#discussion_r579003843
########## File path: processing/src/main/java/org/apache/druid/segment/filter/ExpressionFilter.java ########## @@ -55,6 +69,105 @@ public ExpressionFilter(final Supplier<Expr> expr, final FilterTuning filterTuni this.filterTuning = filterTuning; } + @Override + public boolean canVectorizeMatcher(ColumnInspector inspector) + { + return expr.get().canVectorize(inspector); + } + + @Override + public VectorValueMatcher makeVectorMatcher(VectorColumnSelectorFactory factory) + { + final Expr theExpr = expr.get(); + + DruidPredicateFactory predicateFactory = new DruidPredicateFactory() + { + @Override + public Predicate<String> makeStringPredicate() + { + return Evals::asBoolean; + } + + @Override + public DruidLongPredicate makeLongPredicate() + { + return Evals::asBoolean; + } + + @Override + public DruidFloatPredicate makeFloatPredicate() + { + return Evals::asBoolean; + } + + @Override + public DruidDoublePredicate makeDoublePredicate() + { + return Evals::asBoolean; + } + + // The hashcode and equals are to make SubclassesMustOverrideEqualsAndHashCodeTest stop complaining.. + // DruidPredicateFactory doesn't really need equals or hashcode, in fact only the 'toString' method is called Review comment: changed comment to suggest `DimensionPredicateFilter` should use equals of predicate factory instead of string form ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org