Fang-Yu Rao has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23905 )

Change subject: IMPALA-12844: Support setting DBPROPERTIES
......................................................................


Patch Set 14:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23905/14/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

http://gerrit.cloudera.org:8080/#/c/23905/14/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@8514
PS14, Line 8514:       if (params.getAlter_type() == TAlterDbType.SET_OWNER && 
authzConfig_.isEnabled()) {
> I think you need to authorize the ALTER DATABASE operation for setting db p
Just saw this comment.

My current understanding is that the authorization of the ALTER DATABASE 
statement would have be completed successfully  already when the catalog server 
is executing this line of code.

I think we registered the ALTER privilege on the target database at 
https://gerrit.cloudera.org/c/23905/14/fe/src/main/java/org/apache/impala/analysis/AlterDbSetDbPropertiesStmt.java#42.

We could refer to 
https://gerrit.cloudera.org/c/23905/7/fe/src/main/java/org/apache/impala/analysis/AlterDbSetDbPropertiesStmt.java#51
 for why we registered this privilege request. In short, it matches what 
RangerHiveAuthorizer.java does when Ranger is the authorization provider for 
Apache Hive.

On a related note, after 
https://github.com/apache/impala/blob/3be15fd/fe/src/main/java/org/apache/impala/service/Frontend.java#L2992,
 the authorization is done. If the requesting user fails the authorization, 
there will be an exception thrown and the catalog server won't receive that 
ALTER DATABASE command from Impala's coordinator.

On the other hand, if the authorization is succesful, Impala's frontend at 
https://github.com/apache/impala/blob/3be15fd/fe/src/main/java/org/apache/impala/service/Frontend.java#L3038
 will populate some fields in a TCatalogOpRequest object, which I think will be 
sent to the catalog server for execution.



--
To view, visit http://gerrit.cloudera.org:8080/23905
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I628c7bed4f0c39aed7f5f4ffea52421caf501933
Gerrit-Change-Number: 23905
Gerrit-PatchSet: 14
Gerrit-Owner: Balazs Hevele <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Balazs Hevele <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]>
Gerrit-Comment-Date: Wed, 11 Feb 2026 02:18:53 +0000
Gerrit-HasComments: Yes

Reply via email to