You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/08/31 18:55:51 UTC

[GitHub] [incubator-pinot] Jackie-Jiang opened a new pull request #5952: Support IN_ID_SET predicate

Jackie-Jiang opened a new pull request #5952:
URL: https://github.com/apache/incubator-pinot/pull/5952


   ## Description
   Support `IN_ID_SET` predicate for filtering on serialized `IdSet`
   In order to filter on a serialized `IdSet`, put a special indicator: `__IDSET__` as the first argument of the `IN` clause.
   
   Example query:
   `SELECT COUNT(*) FROM mytable WHERE AirlineID IN ('__IDSET__', 'AgAAAAABAAAAADowAAABAAAAAAADABAAAAAAAOpMg0+zUg==')`
   (`AgAAAAABAAAAADowAAABAAAAAAADABAAAAAAAOpMg0+zUg==` is the base64 encoded `IdSet`)
   


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] kishoreg commented on pull request #5952: Support IN_ID_SET predicate

Posted by GitBox <gi...@apache.org>.
kishoreg commented on pull request #5952:
URL: https://github.com/apache/incubator-pinot/pull/5952#issuecomment-686785321


   show we just model this as UDF?
   
   ```
   SELECT COUNT(*) FROM mytable WHERE AirlineID IN IDSET('AgAAAAABAAAAADowAAABAAAAAAADABAAAAAAAOpMg0+zUg==')
   (AgAAAAABAAAAADowAAABAAAAAAADABAAAAAAAOpMg0+zUg== is the base64 encoded IdSet)
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] Jackie-Jiang commented on pull request #5952: Support IN_ID_SET predicate

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on pull request #5952:
URL: https://github.com/apache/incubator-pinot/pull/5952#issuecomment-689238164


   Replaced with #5973 


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] Jackie-Jiang closed pull request #5952: Support IN_ID_SET predicate

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang closed pull request #5952:
URL: https://github.com/apache/incubator-pinot/pull/5952


   


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #5952: Support IN_ID_SET predicate

Posted by GitBox <gi...@apache.org>.
kishoreg commented on a change in pull request #5952:
URL: https://github.com/apache/incubator-pinot/pull/5952#discussion_r483274857



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/FilterOperatorUtils.java
##########
@@ -49,25 +48,31 @@ public static BaseFilterOperator getLeafFilterOperator(PredicateEvaluator predic
     }
 
     Predicate.Type predicateType = predicateEvaluator.getPredicateType();
-    if (predicateType == Predicate.Type.RANGE) {
-      if (dataSource.getDataSourceMetadata().isSorted()) {
-        return new SortedIndexBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
-      }
-      if (dataSource.getRangeIndex() != null) {
-        return new RangeIndexBasedFilterOperator((OfflineDictionaryBasedRangePredicateEvaluator) predicateEvaluator,
-            dataSource, numDocs);
-      }
-      return new ScanBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
-    } else if (predicateType == Predicate.Type.REGEXP_LIKE) {
-      return new ScanBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
-    } else {
-      if (dataSource.getDataSourceMetadata().isSorted()) {
-        return new SortedIndexBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
-      }
-      if (dataSource.getInvertedIndex() != null) {
-        return new BitmapBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
-      }
-      return new ScanBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
+    switch (predicateType) {

Review comment:
       Good job cleaning this up




----------------------------------------------------------------
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:
users@infra.apache.org



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