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 06:59:35 UTC

[GitHub] [incubator-pinot] yupeng9 opened a new pull request #6391: Added H3IndexFilterOperator

yupeng9 opened a new pull request #6391:
URL: https://github.com/apache/incubator-pinot/pull/6391


   Updated the H3IndexFilter operator with the correct algorithm. Also fixed the schema and corrupted data in the quickstart example.
   


----------------------------------------------------------------
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] yupeng9 commented on pull request #6391: Added H3IndexFilterOperator

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


   @kishoreg comments addressed. PTAL


----------------------------------------------------------------
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] yupeng9 commented on a change in pull request #6391: Added H3IndexFilterOperator

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



##########
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:
       Yes, filter plan node has this logic, so this is defensive checking.




----------------------------------------------------------------
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 merged pull request #6391: Added H3IndexFilterOperator

Posted by GitBox <gi...@apache.org>.
kishoreg merged pull request #6391:
URL: https://github.com/apache/incubator-pinot/pull/6391


   


----------------------------------------------------------------
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 #6391: Added H3IndexFilterOperator

Posted by GitBox <gi...@apache.org>.
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