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/12/29 16:12:22 UTC

[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #6391: Added H3IndexFilterOperator

kishoreg commented on a change in pull request #6391:
URL: https://github.com/apache/incubator-pinot/pull/6391#discussion_r549759907



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/H3IndexFilterOperator.java
##########
@@ -69,30 +76,16 @@ public H3IndexFilterOperator(Predicate predicate, IndexSegment indexSegment, int
     } else {
       throw new RuntimeException("Expecting one of the arguments of ST_DISTANCE to be an identifier");

Review comment:
       better to add this logic in filter plan node and fallback to expressionbased filter operator

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/plan/FilterPlanNode.java
##########
@@ -93,6 +89,25 @@ public BaseFilterOperator run() {
     }
   }
 
+  private boolean canApplyH3Index(Predicate predicate, FunctionContext function) {
+    if (function.getFunctionName().equalsIgnoreCase(StDistanceFunction.FUNCTION_NAME)) {
+      Predicate.Type type = predicate.getType();
+      if (type != Predicate.Type.RANGE) {
+        return false;
+      }
+      RangePredicate rangePredicate = (RangePredicate) predicate;
+      // TODO: support lower bound
+      if (rangePredicate.getUpperBound().equals(RangePredicate.UNBOUNDED) || !rangePredicate.getLowerBound()
+          .equals(RangePredicate.UNBOUNDED)) {
+        return false;
+      }
+      String columnName = function.getArguments().get(0).getIdentifier();

Review comment:
       add a check that the first argument is identifier

##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/GenericQuickstart.java
##########
@@ -106,19 +106,19 @@ public void execute()
 
     Runtime.getRuntime().addShutdownHook(new Thread(() -> {
       try {
-        printStatus(Color.GREEN, "***** Shutting down GitHubEventsQuickStart *****");
+        printStatus(Color.GREEN, "***** Shutting down GenericQuickStart *****");

Review comment:
       GenericQuickstart -> <TableName> quickstart cluster or just QuickstartCluster




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