Arnab Karmakar 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 14:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/23566/13/fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java
File fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java:

http://gerrit.cloudera.org:8080/#/c/23566/13/fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java@225
PS13, Line 225:           "Aggregate functions are not allowed in SHOW 
PARTITIONS WHERE");
> nit: why does this say "SHOW PARTITIONS WHERE clause" but the two preceding
Nice find, Done


http://gerrit.cloudera.org:8080/#/c/23566/13/tests/metadata/test_metadata_query_statements.py
File tests/metadata/test_metadata_query_statements.py:

http://gerrit.cloudera.org:8080/#/c/23566/13/tests/metadata/test_metadata_query_statements.py@79
PS13, Line 79:     assert len(result.data) > 0, "SHOW PARTITIONS with rand() 
should return some \
> There's a non-zero chance that all invocations of rand() return >= 0.5. The
Well, the way rand() works here is different from SELECT WHERE. SHOW PARTITIONS 
doesn't involve backend evaluation and we're not using the pcg32 here(stateful 
generator), thereby even though this function is evaluated for each partition, 
rand() will always return 0.47.
When HdfsPartitionFilter.getMatchingPartitionIds() is used to filter 
partitions, we lose the state and all calls to FeSupport.EvalPredicateBatch() 
for evaluating rand() return the same result. i.e. 0.47.
This behaviour of rand() is documented and I've talked about this with 
Quanlong, and we have other ways of getting random partitions like using uuid().



--
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: 14
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: Wed, 10 Dec 2025 04:33:41 +0000
Gerrit-HasComments: Yes

Reply via email to