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 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@118
PS8, Line 118:     return expr;
> Duplicate code from LiteralExpr.java
Thanks for pointing it out. Refactored Now


http://gerrit.cloudera.org:8080/#/c/23566/8/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/8/fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java@189
PS8, Line 189:     analyzer.setEnablePrivChecks(false);
> What is the intention behind disabling the auth checks?
The auth check disabling prevents redundant privilege checks during internal 
analysis.

Line 116: SHOW PARTITIONS already checks VIEW_METADATA privilege on the table, 
later in line 193 when analysing the WHERE clause, we create a new TableRef 
with the same privilege.

Without disabling checks, tableRef.analyze() re-checks the same privilege, 
causing performance overhead and I was also getting authorization failures.



--
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: Thu, 20 Nov 2025 10:52:25 +0000
Gerrit-HasComments: Yes

Reply via email to