Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23566 )
Change subject: IMPALA-14065: Support WHERE clause in SHOW PARTITIONS statement ...................................................................... Patch Set 9: (2 comments) http://gerrit.cloudera.org:8080/#/c/23566/8/fe/src/main/java/org/apache/impala/analysis/PartitionPredicateEvaluator.java File fe/src/main/java/org/apache/impala/analysis/PartitionPredicateEvaluator.java: http://gerrit.cloudera.org:8080/#/c/23566/8/fe/src/main/java/org/apache/impala/analysis/PartitionPredicateEvaluator.java@77 PS8, Line 77: > 1. We are using seeding here, as we want to execute the rand() function for This is a nice-to-have feature. If the original HdfsPartitionFilter doesn't support this, we can leave it as-is. As SELECT queries like "select rand(), rand(), rand()" always produces the same results which is documented. If users want to pick partitions randomly, we still have other workarounds, e.g. using the uuid() function: show partitions functional.alltypes where left(uuid(), 1) < '8'; http://gerrit.cloudera.org:8080/#/c/23566/8/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java File fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java: http://gerrit.cloudera.org:8080/#/c/23566/8/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java@132 PS8, Line 132: isPartitionPrunedFilterConjunct > I believe the current design is cleaner: For 1 and 2, HdfsPartitionPruner is already used in non-SELECT queries like SHOW FILES statement. https://github.com/apache/impala/blob/c21e5212b73d4b51cd93e8080de69d3dee7bbfb7/fe/src/main/java/org/apache/impala/analysis/PartitionSet.java#L88 I think adding a boolean flag, e.g. evalAllFuncs, to distinguish different usages is cleaner and much simpler. I don't get your point for 3, the current design also uses HdfsPartitionPruner in analysis phase for SHOW PARTITIONS. And as mentioned above, it's already used in analysis phase of other statements. -- To view, visit http://gerrit.cloudera.org:8080/23566 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2e2a14aabcea3fb17083d4ad6f87b7861113f89e Gerrit-Change-Number: 23566 Gerrit-PatchSet: 9 Gerrit-Owner: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Pranav Lodha <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Surya Hebbar <[email protected]> Gerrit-Comment-Date: Mon, 24 Nov 2025 02:46:21 +0000 Gerrit-HasComments: Yes
