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 2021/11/03 15:52:24 UTC

[GitHub] [pinot] kishoreg commented on a change in pull request #7684: Support FST Index using Native FST Library

kishoreg commented on a change in pull request #7684:
URL: https://github.com/apache/pinot/pull/7684#discussion_r742080623



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/FilterOperatorUtils.java
##########
@@ -63,10 +63,10 @@ public static BaseFilterOperator getLeafFilterOperator(PredicateEvaluator predic
       }
       return new ScanBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
     } else if (predicateType == Predicate.Type.REGEXP_LIKE) {
-      if (dataSource.getFSTIndex() != null && dataSource.getDataSourceMetadata().isSorted()) {
+      if (isFSTIndexPresent(dataSource) && dataSource.getDataSourceMetadata().isSorted()) {

Review comment:
       should we call this FSTIndex? seems like leaking implementation detail

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/HLRealtimeSegmentDataManager.java
##########
@@ -291,8 +291,8 @@ public void run() {
           RealtimeSegmentConverter converter =
               new RealtimeSegmentConverter(_realtimeSegment, tempSegmentFolder.getAbsolutePath(), schema,

Review comment:
       is this a formatting change?

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/FilterOperatorUtils.java
##########
@@ -63,10 +63,10 @@ public static BaseFilterOperator getLeafFilterOperator(PredicateEvaluator predic
       }
       return new ScanBasedFilterOperator(predicateEvaluator, dataSource, numDocs);
     } else if (predicateType == Predicate.Type.REGEXP_LIKE) {
-      if (dataSource.getFSTIndex() != null && dataSource.getDataSourceMetadata().isSorted()) {
+      if (isFSTIndexPresent(dataSource) && dataSource.getDataSourceMetadata().isSorted()) {

Review comment:
       we should probably have a logical name and FST can be one such implementation

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/FilterOperatorUtils.java
##########
@@ -201,4 +201,13 @@ private static int getScanBasedFilterPriority(ScanBasedFilterOperator scanBasedF
       return basePriority + 1;
     }
   }
+
+  /**
+   * Perform a composite check to see if there is a FST index present
+   * @param dataSource Datasource to be checked
+   * @return
+   */
+  private static boolean isFSTIndexPresent(DataSource dataSource) {
+    return (dataSource.getFSTIndex() != null || dataSource.getNativeFSTIndex() != null);

Review comment:
       what is the difference between FSTIndex and NativeFSTIndex?




-- 
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: commits-unsubscribe@pinot.apache.org

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