sunithabeeram commented on a change in pull request #3535: Optimize all filter 
predicates by adding isAlwaysTrue()
URL: https://github.com/apache/incubator-pinot/pull/3535#discussion_r236293921
 
 

 ##########
 File path: 
pinot-core/src/main/java/com/linkedin/pinot/core/operator/filter/AndFilterOperator.java
 ##########
 @@ -28,6 +28,7 @@
   private final List<BaseFilterOperator> _filterOperators;
 
   public AndFilterOperator(List<BaseFilterOperator> filterOperators) {
+    // NOTE: EmptyFilterOperator and MatchAllFilterOperator should not be 
passed into the AndFilterOperator
 
 Review comment:
   Additional comments/context is great - thanks for adding that; however, it 
might be better to programatically enforce it via constructor checks (throw 
IllegalArg/State Exc for example) so the contract is not broken when code gets 
refactored/changed. In other places in this PR you have used asserts. These are 
weak checks as they can be disabled at the JVM level; would be good to consider 
throwing exceptions instead.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to