Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/18829 )
Change subject: IMPALA-7942 (part 1): Add query hints for table cardinalities ...................................................................... Patch Set 4: (4 comments) > Patch Set 4: > > (13 comments) > > Hi Quanlong, thanks for advice. I think you are right, use hint value to > replace original table stats may cause consistency when use explain. So I > modify the code, table hint is valid when no stats or has corrupt stats. Here > is a problem, I use 'functional.alltypes' for hdfs table with stats, > 'functional_parquet.alltypes' for hdfs table without stats, > 'functional_kudu.alltypes' for kudu table with stats. > But I did not figure out the way to test kudu table without stats. Thanks for updating the patch! I'm not sure whether we should allow the hint to overwrite valid table stats and fix the explain result instead. This worths a broader discussion. Not sure how other systems design. http://gerrit.cloudera.org:8080/#/c/18829/4/fe/src/main/java/org/apache/impala/analysis/TableRef.java File fe/src/main/java/org/apache/impala/analysis/TableRef.java: http://gerrit.cloudera.org:8080/#/c/18829/4/fe/src/main/java/org/apache/impala/analysis/TableRef.java@174 PS4, Line 174: correct nit: corrupt http://gerrit.cloudera.org:8080/#/c/18829/4/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java File fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java: http://gerrit.cloudera.org:8080/#/c/18829/4/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java@1548 PS4, Line 1548: If table already has stats, this hint will not nit: "If the table has valid stats, this hint will be ignored". http://gerrit.cloudera.org:8080/#/c/18829/4/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java@1548 PS4, Line 1548: no stats nit: "has no stats" http://gerrit.cloudera.org:8080/#/c/18829/4/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java@1624 PS4, Line 1624: if table no stats nit: "if the table has no stats" -- To view, visit http://gerrit.cloudera.org:8080/18829 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9f0c773f4e67782a1428db64062f68afbd257af7 Gerrit-Change-Number: 18829 Gerrit-PatchSet: 4 Gerrit-Owner: wangsheng <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Fucun Chu <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: wangsheng <[email protected]> Gerrit-Comment-Date: Mon, 05 Sep 2022 02:01:53 +0000 Gerrit-HasComments: Yes
