jamesyfshao commented on a change in pull request #4943: Adding basic null 
predicate support
URL: https://github.com/apache/incubator-pinot/pull/4943#discussion_r360582910
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/plan/FilterPlanNode.java
 ##########
 @@ -111,6 +113,15 @@ private static BaseFilterOperator 
constructPhysicalOperator(FilterQueryTree filt
       // Leaf filter operator
       Predicate predicate = Predicate.newPredicate(filterQueryTree);
 
+      // Check for null predicate
+      Predicate.Type type = predicate.getType();
+      if (type.equals(Predicate.Type.IS_NULL) || 
type.equals(Predicate.Type.IS_NOT_NULL)) {
+        DataSource dataSource = 
segment.getDataSource(filterQueryTree.getColumn());
+        ImmutableRoaringBitmap nullBitmap = 
dataSource.getNullValueVector().getNullBitmap();
+        boolean exclusive = (type == Predicate.Type.IS_NULL) ? false : true;
 
 Review comment:
   I think we can either change this to boolean exclusive = type != 
Predicate.Type.IS_NULL or maybe move the entire thing to the next statement?

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to