Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/15250 )
Change subject: IMPALA-6689: Speed up point lookup for Kudu primary key ...................................................................... Patch Set 5: (3 comments) http://gerrit.cloudera.org:8080/#/c/15250/2/fe/src/main/java/org/apache/impala/planner/KuduScanNode.java File fe/src/main/java/org/apache/impala/planner/KuduScanNode.java: http://gerrit.cloudera.org:8080/#/c/15250/2/fe/src/main/java/org/apache/impala/planner/KuduScanNode.java@400 PS2, Line 400: } > done As precondition I meant this: Preconditions.checkState(rpcTable.getSchema().getPrimaryKeyColumnCount() >= 1); This is an invarant for Kudu tables that has to be true, otherwise there is a bug here. http://gerrit.cloudera.org:8080/#/c/15250/5/fe/src/main/java/org/apache/impala/planner/KuduScanNode.java File fe/src/main/java/org/apache/impala/planner/KuduScanNode.java: http://gerrit.cloudera.org:8080/#/c/15250/5/fe/src/main/java/org/apache/impala/planner/KuduScanNode.java@290 PS5, Line 290: Math.min(1, cardinality_) getNumRows() can return -1 if the number of rows is unknown. Using 1 as cardinality is a much better estimate. http://gerrit.cloudera.org:8080/#/c/15250/5/fe/src/main/java/org/apache/impala/planner/KuduScanNode.java@294 PS5, Line 294: cardinality_ = capCardinalityAtLimit(cardinality_); ps5 moved this back to the block. I think that it should be still applied in the isPointLookupQuery_ case too to handle limit 0. Even if will become an empty plan, it seems more correct that way. -- To view, visit http://gerrit.cloudera.org:8080/15250 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4631cd4d1a528a1152b5cdcb268426f2ba1a0c08 Gerrit-Change-Number: 15250 Gerrit-PatchSet: 5 Gerrit-Owner: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Anurag Mantripragada <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Fri, 21 Feb 2020 09:27:46 +0000 Gerrit-HasComments: Yes
