ankitsultana opened a new issue, #10523:
URL: https://github.com/apache/pinot/issues/10523

   In V1 engine, we do not allow comparisons such as `longCol < 
Long.MIN_VALUE`. 
[Example](https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/operator/filter/predicate/RangePredicateEvaluatorFactory.java#L381)
   
   This works fine for V1 queries, but in V2 engine Calcite can re-write 
filters. For example: a query with filters like `colName != Long.MIN_VALUE or 
colName < 10` gets translated to `(colName < Long.MIN_VALUE) OR (colName > 
Long.MIN_VALUE AND colName < 10`.
   
   This can lead to failures with errors such as follows:
   ```
   Caused by: java.lang.IllegalArgumentException: Invalid range: colName < 
'-9223372036854775808'
       at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:210)
       at 
org.apache.pinot.core.operator.filter.predicate.RangePredicateEvaluatorFactory$LongRawValueBasedRangePredicateEvaluator.<init>(RangePredicateEvaluatorFactory.java:386)
       at 
org.apache.pinot.core.operator.filter.predicate.RangePredicateEvaluatorFactory.newRawValueBasedEvaluator(RangePredicateEvaluatorFactory.java:85)
       at 
org.apache.pinot.core.operator.filter.predicate.RangePredicateEvaluatorFactory$UnsortedDictionaryBasedRangePredicateEvaluator.<init>(RangePredicateEvaluatorFactory.java:273)
   ```
   
   Some possible solutions:
   
   1. Add support for these filters in V1 engine itself.
   2. Add a rule in v2 optimizers to detect tautologies. The rule could be 
enhanced in the future to add more cases.
   
   cc: @walterddr 


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

Reply via email to