pranavbhole commented on code in PR #16241:
URL: https://github.com/apache/druid/pull/16241#discussion_r1597912954
##########
processing/src/main/java/org/apache/druid/segment/filter/SpatialFilter.java:
##########
@@ -174,8 +173,18 @@ public DruidObjectPredicate<String> makeStringPredicate()
if (input == null) {
return DruidPredicateMatch.UNKNOWN;
}
- final float[] coordinate =
SpatialDimensionRowTransformer.decode(input);
- return DruidPredicateMatch.of(bound.contains(coordinate));
+ return DruidPredicateMatch.of(bound.containsObj(input));
+ };
+ }
+
+ @Override
+ public DruidObjectPredicate<Object> makeObjectPredicate()
+ {
+ return input -> {
+ if (input == null) {
+ return DruidPredicateMatch.UNKNOWN;
+ }
+ return DruidPredicateMatch.of(bound.containsObj(input));
Review Comment:
containsObj method is mainly added for extensibility perspective, it makes
life easier to create object matchers and we can utilize the existing spatial
filters.
--
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]