kishoreg commented on a change in pull request #4943: Adding basic null
predicate support
URL: https://github.com/apache/incubator-pinot/pull/4943#discussion_r360587208
##########
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 prefer avoiding ternary operators altogether as a convention :)
https://agiletribe.wordpress.com/2011/11/01/21-avoid-ternary-conditional-operator/
```
boolean exclusive = false;
if(type == Predicate.Type.IS_NULL) {
exclusive = true
}
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]