You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org> on 2025/10/22 00:39:48 UTC

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23569


Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users would like to insert data
into a different set of columns in the same table, e.g., a Kudu table.

This would also allow an administrator to add deny polices on columns
involved in the INSERT statement against a user if we would like to
prevent the user from inserting data into the specified columns.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
3 files changed, 12 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/1
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 5:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12627/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 5
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 04 Nov 2025 22:41:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 17: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12887/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 04:12:01 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12597/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 18:39:12 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG@56
PS23, Line 56:       columns given that there is no deny policy on those columns and
             :       no column masking policy on any column of the 
> > Can you mention this change also earlier in the commit message?
Thanks for the detailed explanation! I am not too familiar with the audit log and didn't realize that multiple auth requests for the same policy produce only one entry



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 09:15:20 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#24).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table. Moreover, column-level
Ranger audit events for INSERT requests will be produced after this
patch.

This would also allow an administrator to add deny policies on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

On the other hand, this patch slightly revises the Preconditions checks
in BaseAuthorizationChecker#authorize() so that it is easier to
understand what those checks verify. The code comment there explicitly
mentions that for a statement that may produce several hierarchical
privilege requests, it should always have a corresponding table-level
privilege request if it has a column-level privilege request. This was
not entirely true and could not be detected by the previous checks.
Specifically, for the CREATE TABLE <db>.<target_tbl> AS SELECT
statement, we would register an ANY privilege request for the column
with wildcard table and column names denoting any column and table in
the database the target table belongs, i.e., '<db>.*.*', whereas there
was no privilege request for the table '<db>.*' registered. This patch
corrects this by registering an ANY privilege request for the database
of the target table instead. Due to this, we also changed the expected
error messages for some Java and end-to-end authorization-related tests.
This should not affect the security in that the resulting
RangerResourceImpl sent to the Ranger plug-in is the same whether the
privilege request is an ANY privilege request for the wildcard column
'<db>.*.*' or an ANY privilege request for the database '<db>'. Refer to
RangerAuthorizationChecker#authorizeResource() for more details.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 720 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/24
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#10).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
12 files changed, 758 insertions(+), 125 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/10
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 10
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 10:

(2 comments)

gerrit-auto-critic failed. You can reproduce it locally using command:

  python3 bin/jenkins/critique-gerrit-review.py --dryrun

To run it, you might need a virtual env with Python3's venv installed.

http://gerrit.cloudera.org:8080/#/c/23569/10/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/10/tests/authorization/test_ranger.py@1537
PS10, Line 1537: p
flake8: F841 local variable 'policy_cnt' is assigned to but never used


http://gerrit.cloudera.org:8080/#/c/23569/10/tests/authorization/test_ranger.py@1575
PS10, Line 1575: +
flake8: W504 line break after binary operator



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 10
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 07:08:59 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 11:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12835/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 09:16:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12952/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 19:50:42 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 18: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12903/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 10 Jan 2026 11:41:24 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 20:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21414/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 20
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 04:02:33 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 7:

(2 comments)

In patch set 7, I have addressed Riza's comments on patch set 5.

Let me know if there are additional suggestions. Thanks!

http://gerrit.cloudera.org:8080/#/c/23569/5/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/5/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@158
PS5, Line 158: // we call InsertStmt#analyze(), which in turn registers column-level INSERT
             :           // privilege requests.
> Can you turn this into a constant of ImmutableSet?
Sure. I will turn this into an a constant of ImmutableSet in patch set 7.


http://gerrit.cloudera.org:8080/#/c/23569/5/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/5/tests/authorization/test_ranger.py@1509
PS5, Line 1509:             .format(unique_database, unique_table, columns[0], columns[1]))
              : 
              :         # Grant the INSERT privilege on the table to 'grantee_user'.
              :         admin_client.execute("grant insert on table {0}.{1} to user {2}"
              :             .format(unique_database, unique_table, grantee_user))
              :         # Add a deny policy on 'columns[0]' to prevent 'grantee_user' from inserting data
              :         # into this column.
              :         TestRanger._add_deny_policy(unique_name, grantee_user, unique_database,
              :             unique_table, columns[0], "update")
              :         admin_client.execute("
> Can you add comments on these test steps?
Thanks Riza!

I will add more code comment in patch set 7. Hopefully it will be clearer.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 7
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 06 Nov 2025 19:32:49 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#8).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level ones,
   b) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns,
   c) a user is not allowed to insert data into a table if there is a
      deny policy defined on a column of the table against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   d) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   e) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
11 files changed, 705 insertions(+), 97 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/8
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12594/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 01:09:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 22:

(1 comment)

I addressed Quanlong's comment on patch set 21, and resolved the conflicts due to https://gerrit.cloudera.org/c/23908/ (IMPALA-14703: Improves finding column masking policies of a table). Hopefully the dryrun at https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3397/ will be successful.

http://gerrit.cloudera.org:8080/#/c/23569/21//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23569/21//COMMIT_MSG@15
PS21, Line 15: policie
> nit: "policies"
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 22
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 29 Jan 2026 21:56:19 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 11: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Dec 2025 03:21:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#16).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
12 files changed, 737 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/16
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 16
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 3: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sat, 25 Oct 2025 23:56:09 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#3).

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users would like to insert data
into a different set of columns in the same table, e.g., a Kudu table.

This would also allow an administrator to add deny polices on columns
involved in the INSERT statement against a user if we would like to
prevent the user from inserting data into the specified columns.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
6 files changed, 75 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/3
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12608/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sat, 25 Oct 2025 19:08:37 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#15).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
12 files changed, 734 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/15
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 15
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 15: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12878/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 15
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 06:44:14 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@156
PS14, Line 156:           // The table-level SELECT, INSERT, or CREATE must be the first table-level
              :           // request, and it must precede all column-level privilege requests.
              :           // We allow the CREATE privilege because in CreateTableAsSelectStmt#analyze(),
              :           // we call InsertStmt#analyze(), which in turn registers column-level INSERT
              :           // privilege requests.
              :           // We allow the ALL privilege because for the UPSERT operation against Kudu
              :           // tables, we set the required privilege to ALL since we don't have an UPSERT
              :           // privilege yet. Refer to InsertStmt#analyzeTargetTable().
              :           Preconditions.checkState((requests.isEmpty() ||
              :               !(privReq.getAuthorizable().getType() == Authorizable.Type.COLUMN)) ||
              :               (requests.get(0).getAuthorizable().getType() == Authorizable.Type.TABLE &&
              :                   ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES.contains(
              :                       requests.get(0).getPrivilege())));
> > Is this really what we want to check here?
The revised condition suggested by me above would actually fail the following query.

 create table test_db_10.alltypestiny_id as select id from functional.alltypestiny

The reason is that we registered the following privilege request for an AuthorizableColumn with table name "*" and column name "*". This could not be caught by the current condition in that this is the only AuthorizableColumn associated with the table 'test_db_10.*'. The registration was triggered by "FeDb db = analyzer.getDb(createStmt_.getDb(), Privilege.ANY)" in https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java.

 privReq = {PrivilegeRequest@9473} 
  authorizable_ = {AuthorizableColumn@9474} 
   columnName_ = "*"
   dbName_ = "test_db_10"
   tableName_ = "*"
   ownerUser_ = "admin"
   columns_ = {ArrayList@9475}  size = 0
  privilege_ = {Privilege@7676} "ANY"

To work around this, we could consider adding the following condition.

 (privReq.getAuthorizable().getType() == Authorizable.Type.COLUMN &&
                   !privReq.getAuthorizable().getDbName().equals("*") &&
                   privReq.getAuthorizable().getTableName().equals("*") &&
                   privReq.getAuthorizable().getColumnName().equals("*"))

I will give this a try in the next patch.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 00:48:37 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14:

(4 comments)

I have replied to reviewers' comments and will prepare a follow-up patch set accordingly.

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@156
PS14, Line 156:           // The table-level SELECT, INSERT, or CREATE must be the first table-level
              :           // request, and it must precede all column-level privilege requests.
              :           // We allow the CREATE privilege because in CreateTableAsSelectStmt#analyze(),
              :           // we call InsertStmt#analyze(), which in turn registers column-level INSERT
              :           // privilege requests.
              :           // We allow the ALL privilege because for the UPSERT operation against Kudu
              :           // tables, we set the required privilege to ALL since we don't have an UPSERT
              :           // privilege yet. Refer to InsertStmt#analyzeTargetTable().
              :           Preconditions.checkState((requests.isEmpty() ||
              :               !(privReq.getAuthorizable().getType() == Authorizable.Type.COLUMN)) ||
              :               (requests.get(0).getAuthorizable().getType() == Authorizable.Type.TABLE &&
              :                   ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES.contains(
              :                       requests.get(0).getPrivilege())));
> Is this really what we want to check here?

Thanks for pointing this out Csaba!

I don't think this is really what we want to check here.

Based on the code comment before this patch, I think we wanted to check the following. However, it looks like we actually allow the cases when there is only one column-level privilege request, or when there is one column-level privilege request followed by a table-level privilege request as you pointed out.

 // The table-level SELECT must be the first table-level request, and it
 // must precede all column-level privilege requests.

I am wondering maybe we could change the precondition to the following.

 !requests.isEmpty() || (privReq.getAuthorizable().getType() == Authorizable.Type.TABLE &&  ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES.contains(privReq.getPrivilege()))

That is, if 'requests' is empty (meaning that the current 'privReq' is the first privilege request associated with 'tableName'), we should guarantee that a) the type of Authorizable of 'privReq' is TABLE, and b) 'privReq' should be one in {SELECT, INSERT, CREATE, ALL}.

I hope I did not miss something important above. I will try the revised condition above in the next patch and will trigger a pre-commit run to make sure this does not cause problems. I will also revise the code comment accordingly.

On a related note, it looks like this complicated condition was originally added by https://gerrit.cloudera.org/c/732/8/fe/src/main/java/com/cloudera/impala/analysis/AnalysisContext.java#396 for CDH-23206: Impala support for column-level authorization (part 2), which is not even associated with an Apache Impala JIRA number.

On another related note, the code comment above was actually suggested by Alex Behm at https://gerrit.cloudera.org/c/732/4/fe/src/main/java/com/cloudera/impala/analysis/AnalysisContext.java#394.


http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@191
PS14, Line 191:  Type.COLUMN
> nit: Authorizable.Type.COLUMN would be more consistent
I will address this comment in the next patch.


http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@268
PS14, Line 268: "insert into functional.alltypes (id, string_col) partition " +
              :             "(year, month) values (1, \"abc\", 2026, 12)
> nit: we can declare 'insertQuery' outside and use it here as well.
Thanks Quanlong! I will address this in the next patch.


http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@511
PS14, Line 511:       // It's possible that we still have a policy with exactly the same resource
              :       // specified by ('databaseName', 'tableName', 'columnName') e
Thanks Csaba!

I just realize that the code comment below is not true when 'columnName' is not "*", the wildcard character denoting all the columns of a table.

 // It's possible that we still have a policy with exactly the same resource
 // specified by ('databaseName', 'tableName', 'columnName') even though
 // there is no user or group associated with the policy.

Specifically, when we are using CDP Ranger 2.4.0.7.3.1.500-182, we are not able to create a policy on a column that is not associated with any principals, e.g., groups, or users (either via the GRANT statements or the REST API calls on the command line).

So it looks like the scenario is impossible as you pointed out.

> If this is not a normal scenario, then I think that we should return an error in this case.

On the other hand, before this test case is run, if there is already a policy on the same column, i.e., functional.alltypes.id, associated with principals other than 'user_.getShortName()', then createRangerPolicy() would fail.

I guess we could consider this case as an abnormal case and just return the error (v.s. deleting the matching policy with respect to ('databaseName', 'tableName', 'columnName') to make the test case proceed).

I will revise the patch accordingly in the next patch.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 06 Jan 2026 22:57:43 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#19).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 758 insertions(+), 149 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/19
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 19
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 20:40:49 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24: Code-Review+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 08:12:10 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG@9
PS23, Line 9: This patch registers column-level privilege requests for columns
            : involved in the INSERT statement so that the requesting user does not
            : need to be granted the INSERT privilege on the entire table.
What happens if the DML inserts into all columns? Will Impala register requests for all columns?


http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG@56
PS23, Line 56:    e) column-level Ranger audit events could be produced after the
             :       introduction of column-level INSERT privilege,
Can you mention this change also earlier in the commit message? BTW can't this increase the number of audit log entries drastically? Do you know if Hive works the same?


http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
File fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java:

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java@660
PS23, Line 660:     String json = String.format("{\n" +
optional: using multiline strings (""") would make this more readable



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 05 Feb 2026 07:41:48 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#18).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
13 files changed, 748 insertions(+), 139 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/18
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#9).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
12 files changed, 710 insertions(+), 125 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/9
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 9
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 4:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20798/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 4
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sun, 02 Nov 2025 03:53:08 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 22:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21531/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 22
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 29 Jan 2026 22:20:43 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 10:

In patch set 10, I added a new test case in which we verify a user is not allowed to insert values into a column if there is a deny policy defined on the entire target table, even though the user was granted the INSERT privilege on the column.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 10
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 07:11:18 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21272/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Sat, 03 Jan 2026 00:06:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@156
PS14, Line 156:           // The table-level SELECT, INSERT, or CREATE must be the first table-level
              :           // request, and it must precede all column-level privilege requests.
              :           // We allow the CREATE privilege because in CreateTableAsSelectStmt#analyze(),
              :           // we call InsertStmt#analyze(), which in turn registers column-level INSERT
              :           // privilege requests.
              :           // We allow the ALL privilege because for the UPSERT operation against Kudu
              :           // tables, we set the required privilege to ALL since we don't have an UPSERT
              :           // privilege yet. Refer to InsertStmt#analyzeTargetTable().
              :           Preconditions.checkState((requests.isEmpty() ||
              :               !(privReq.getAuthorizable().getType() == Authorizable.Type.COLUMN)) ||
              :               (requests.get(0).getAuthorizable().getType() == Authorizable.Type.TABLE &&
              :                   ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES.contains(
              :                       requests.get(0).getPrivilege())));
This precondition is very hard to understand - the condition seems false only if there is a column priv request, and there is already a first request that is not a table level request, e.g. it will fail for 2 column level requests, but not for 1 column level requests or a column level request followed by a table level request. Is this really what we want to check here?


http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@191
PS14, Line 191:  Type.COLUMN
nit: Authorizable.Type.COLUMN would be more consistent


http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@511
PS14, Line 511:       // It's possible that we still have a policy with exactly the same resource
              :       // specified by ('databaseName', 'tableName', 'columnName') e
Why is this possible? Don't every test clean up the policies it has created after running?

If this is not a normal scenario, then I think that we should return an error in this case.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Mon, 05 Jan 2026 14:11:34 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#17).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
13 files changed, 747 insertions(+), 138 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/17
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 16:

> Patch Set 16: Verified-1
> 
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12881/

This failed tests/authorization/test_ranger.py::TestRangerWithCalcite::test_view_on_view_all_configs.

The reason is that given a SELECT query against a view v2 defined on another view v1, if v2's table property 'Authorized' is set to 'false', then we would have the following privilege requests registered (listed in the order according to which they are registered) when we use Calcite as the planner.

- AuthorizableTable v2.
- AuthorizableColumn's for referenced columns in v1.
- AuthorizableTable v1.
- AuthorizableColumn's for referenced columns in v2.

It could be seen that AuthorizableColumn's for referenced columns in v1 are registered before AuthorizableTable for v1, and therefore this would fail the Preconditions check in patch set 16. The Preconditions check in patch set 16 seems to be too restrictive.

I will try to come up with a relaxed Preconditions check in the next patch.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 16
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 08 Jan 2026 23:08:41 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23:

Does anyone still have additional suggestions? Thanks very much for the help!


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 21:44:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#23).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny policies on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

On the other hand, this patch slightly revises the Preconditions checks
in BaseAuthorizationChecker#authorize() so that it is easier to
understand what those checks verify. The code comment there explicitly
mentions that for a statement that may produce several hierarchical
privilege requests, it should always have a corresponding table-level
privilege request if it has a column-level privilege request. This was
not entirely true and could not be detected by the previous checks.
Specifically, for the CREATE TABLE <db>.<target_tbl> AS SELECT
statement, we would register an ANY privilege request for the column
with wildcard table and column names denoting any column and table in
the database the target table belongs, i.e., '<db>.*.*', whereas there
was no privilege request for the table '<db>.*' registered. This patch
corrects this by registering an ANY privilege request for the database
of the target table instead. Due to this, we also changed the expected
error messages for some Java and end-to-end authorization-related tests.
This should not affect the security in that the resulting
RangerResourceImpl sent to the Ranger plug-in is the same whether the
privilege request is an ANY privilege request for the wildcard column
'<db>.*.*' or an ANY privilege request for the database '<db>'. Refer to
RangerAuthorizationChecker#authorizeResource() for more details.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 702 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/23
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23:

I resolved some conflicts in RangerAuditLogTest.java and test_ranger.py due to us merging https://gerrit.cloudera.org/c/23877/ (IMPALA-10913: Produce Ranger audit log for SHOW DATABASES) first. Hopefully the triggered dryrun at https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3403/ will be successful.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 01:40:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20743/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 01:07:42 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20748/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 19:03:07 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#7).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level ones,
   b) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns,
   c) a user is not allowed to insert data into a table if there is a
      deny policy defined on a column of the table against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   d) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   e) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
10 files changed, 522 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/7
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 7
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 20:

> Patch Set 20:
> 
> (3 comments)
> 
> In patch set 19, I addressed Csaba's comments on patch set 18, and added more commit messages describing the changes to the Preconditions checks in BaseAuthorizationChecker#analyze().
> 
> Let me know if there are more suggestions. Thanks!

Sorry by patch set 19, I meant patch set 20.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 20
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 02:55:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 4: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 4
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sun, 02 Nov 2025 08:13:25 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 5: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 5
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 05 Nov 2025 03:29:39 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 7:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20841/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 7
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 06 Nov 2025 19:57:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12952/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 17 Jan 2026 01:26:32 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21:

I slightly revised patch set 20 so that the Preconditions checks in BaseAuthorizationChecker#authorize() is more concise in patch set 21.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 19:52:06 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 17:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21322/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 00:08:48 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 9:

(7 comments)

I have addressed Quanlong's comments on the patch set 8. Let me know if there are additional suggestions. Thanks!

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
File fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java:

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java@273
PS8, Line 273:    * 4. Privilege level is neither SELECT nor INSERT.
> nit: need to update this as well
Done


http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
File fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java:

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java@31
PS8, Line 31: public class AuthorizableColumn extends AuthorizableTable {
> Most of the code in this class is identical to AuthorizableTable. Can we le
Thanks Quanlong!

Indeed, the code in AuthorizableColumn and AuthorizableTable is almost the same. I will make AuthorizableColumn inherit AuthorizableTable and just override getType(), getColumnName(), and getName(). getName() has to be overridden because it should return the fully-qualified column name of a column.


http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java@79
PS8, Line 79: 
            : 
> nit: can be in one line
Done


http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@53
PS8, Line 53: ALLOWED_HIER_AUTHZ_TABLE
> I was confused why REFRESH, ALTER, DROP are not here. Then I realized this 
Thanks Quanlong!

In the next patch, I will change this to ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES.


http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@731
PS7, Line 731:     // rowFilterResult.isRowFilterEnabled() will return false and thus the requesting
Yes. A test case added by https://gerrit.cloudera.org/c/17230/ (IMPALA-10554: Block updates when row-filter/column-mask is enabled for the user) in AuthorizationStmtTest#testUpdateOnMaskedTables() covers this. In this test case, the requesting user is granted the ALL privilege on the SERVER but still should not be able to insert values into the table 'functional.alltypes' since there is a row filtering policy defined on the table 'functional.alltypes' against the requesting user.

 insert into functional.alltypes partition(year, month) select * from functional.alltypestiny

Note that given such an INSERT statement, after this patch, Impala's authorization checker would check the following 2 items  during authorization (v.s. only the first one). The requesting user would be allowed to execute the INSERT statement as long as the user could insert values into each target column involved in the query, even though the user could not insert values into the entire table.
- Whether the requesting user is allowed to insert values into the entire table.
- Whether the requesting user is allowed to insert values into each target column.

Without us temporarily changing the type of resource from column to table, rowFilterResult.isRowFilterEnabled() at https://gerrit.cloudera.org/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java#738 would evaluate to false when authorizable.getType() is Type.COLUMN, and thus the privilege request for inserting values into the corresponding column would not be denied.

I will add more code comment in the next patch because the current code comment is not clear enough.

> Should we set the owner here?

I also tried to see if it really matters. I found that the result of rowFilterResult.isRowFilterEnabled() would be the same whether we provide the owner of the table. But I think it does not hurt to set the owner of the table here.


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1489
PS7, Line 1489:       admin_client.execute("drop database if exists {0} cascade"
> Just realized even inserting to columns not used in the masking policies is
Ack


http://gerrit.cloudera.org:8080/#/c/23569/8/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/8/tests/authorization/test_ranger.py@1522
PS8, Line 1522: tbl, columns[0]
> nit: might be more readable to use a variable like 'tbl', e.g. change L1519
Thanks for the suggestion Quanlong! I will revise this test and _test_deny_insert_into_column_partitioned_table() accordingly.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 9
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Dec 2025 22:47:31 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13030/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 01:37:11 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 7:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@731
PS7, Line 731:           .table(authorizable.getTableName())
Should we set the owner here?


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1489
PS7, Line 1489:   def _test_deny_insert_into_column(self, unique_name):
Can we add another test that if there is a column-masking policy enabled for the user on a column, the user shouldn't be able to insert the column but OK on other columns? IIUC, column-masking policy should block users from modifying the source of the masked data (RANGER-1087).


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1496
PS7, Line 1496:     allowed_query = ("insert into {0}.{1}({2}) values (1)"
How about UPDATE statement on Kudu and Iceberg tables and MERGE statement on Iceberg tables? Do they have the same behavior as INSERT?


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1508
PS7, Line 1508:         admin_client.execute("create table {0}.{1} ({2} int, {3} bigint)"
              :             .format(unique_database, unique_table, columns[0], columns[1]))
Can we also add tests for partitioned tables and Iceberg tables?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 7
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 12 Nov 2025 10:57:36 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 8:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
File fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java:

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java@273
PS8, Line 273:    * 4. Privilege level is not SELECT.
nit: need to update this as well


http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
File fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java:

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java@31
PS8, Line 31: public class AuthorizableColumn extends Authorizable {
Most of the code in this class is identical to AuthorizableTable. Can we let AuthorizableColumn inherit AuthorizableTable and just override getType() and getColumnName()?


http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java@79
PS8, Line 79:   public List<String> getColumns() {
            :     return columns_; }
nit: can be in one line


http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/8/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@53
PS8, Line 53: ALLOWED_TABLE_PRIVILEGES
I was confused why REFRESH, ALTER, DROP are not here. Then I realized this is only used for hierarchical auth stmt. Maybe rename it to ALLOWED_HIER_AUTH_TABLE_PRIVILEGES or ALLOWED_HIER_AUTH_TBL_PRIVILEGES or HIER_AUTH_TBL_PRIVS.


http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@731
PS7, Line 731:           .table(authorizable.getTableName())
> Yes. We should set the owner user here.
Is there a test that can cover this, i.e. a test that fails without this fix?


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1489
PS7, Line 1489:       admin_client.execute("drop database if exists {0} cascade"
> Done
Just realized even inserting to columns not used in the masking policies is not allowed. I think it's fine to be consistent with Hive's such behavior.


http://gerrit.cloudera.org:8080/#/c/23569/8/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/8/tests/authorization/test_ranger.py@1522
PS8, Line 1522: create_query[1]
nit: might be more readable to use a variable like 'tbl', e.g. change L1519 to be

 for create_stmt, tbl in create_queries:



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 18 Dec 2025 13:22:32 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 11: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12835/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 14:08:36 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 22: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 22
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 30 Jan 2026 03:38:02 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#22).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny policies on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

On the other hand, this patch slightly revises the Preconditions checks
in BaseAuthorizationChecker#authorize() so that it is easier to
understand what those checks verify. The code comment there explicitly
mentions that for a statement that may produce several hierarchical
privilege requests, it should always have a corresponding table-level
privilege request if it has a column-level privilege request. This was
not entirely true and could not be detected by the previous checks.
Specifically, for the CREATE TABLE <db>.<target_tbl> AS SELECT
statement, we would register an ANY privilege request for the column
with wildcard table and column names denoting any column and table in
the database the target table belongs, i.e., '<db>.*.*', whereas there
was no privilege request for the table '<db>.*' registered. This patch
corrects this by registering an ANY privilege request for the database
of the target table instead. Due to this, we also changed the expected
error messages for some Java and end-to-end authorization-related tests.
This should not affect the security in that the resulting
RangerResourceImpl sent to the Ranger plug-in is the same whether the
privilege request is an ANY privilege request for the wildcard column
'<db>.*.*' or an ANY privilege request for the database '<db>'. Refer to
RangerAuthorizationChecker#authorizeResource() for more details.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 703 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/22
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 22
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#4).

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users would like to insert data
into a different set of columns in the same table, e.g., a Kudu table.

This would also allow an administrator to add deny polices on columns
involved in the INSERT statement against a user if we would like to
prevent the user from inserting data into the specified columns.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M tests/authorization/test_ranger.py
7 files changed, 233 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/4
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 4
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 17:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12887/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 08 Jan 2026 23:11:59 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 18:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21350/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 10 Jan 2026 07:41:55 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@763
PS23, Line 763: info
nit: this might be too verbose if we log it for all the columns.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 05 Feb 2026 06:58:32 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21552/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 02:02:59 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 08:13:27 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
File fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java:

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java@660
PS23, Line 660:             "  \"name\": \"%s\",\n" +
> I am not very sure if we could use multi-line strings/text blocks without c
you are right, I didn't realize that we can't do this with current Java version - there's no need to put effort to this



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 09:13:50 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#11).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
12 files changed, 757 insertions(+), 125 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/11
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 11:

> Patch Set 11: Verified-1
> 
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12835/

The failed test was test_partitioned_insert_v2() in https://github.com/apache/impala/blob/master/tests/query_test/test_iceberg.py, which does not seem to be caused by my patch. Created IMPALA-14643 to keep track of the issue.

I will re-trigger the Jenkins jobs.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 22:23:08 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@268
PS14, Line 268: "insert into functional.alltypes (id, string_col) partition " +
              :             "(year, month) values (1, \"abc\", 2026, 12)
nit: we can declare 'insertQuery' outside and use it here as well.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Sat, 03 Jan 2026 02:45:37 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14:

(3 comments)

Hi all, I have addressed Quanlong's comments on patch set 13. Let me know if there are additional suggestions. Thanks!

http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@256
PS13, Line 256: 4, events.size());
              :       assertEventEquals("@column", "insert", "functiona
> nit: this long string can be extracted as a variable.
Sure. I will make this a variable in the next patch.


http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@458
PS13, Line 458:           "values (1, 1)", events.get(0).getRequestData());
Thanks Quanlong!

Based on my observation, we deal with non-existing tables and non-existing columns differently. We register the privilege request for a table whether or not the table exists, whereas we register the privilege request for a column only if the column exists. The details are provided as follows.

In Analyzer#getTable() (https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/Analyzer.java), we register the table-level privilege request regardless of whether the table exists. Specifically, getTableNoThrow() won't throw an exception even though the table does not exist. The exception will be thrown from getTable(fqTableName.getDb(), fqTableName.getTbl(), /* must_exist */ true) for a non-existing table.

  public FeTable getTable(TableName tableName, boolean addAccessEvent,
      boolean addColumnPrivilege, Privilege... privilege)
      throws AnalysisException, TableLoadingException {
    ...
    FeTable table = getTableNoThrow(fqTableName.getDb(), fqTableName.getTbl());
    final String tableOwner = table == null ? null : table.getOwnerUser();
    for (Privilege priv : privilege) {
      if (priv == Privilege.ANY || addColumnPrivilege) {
        registerPrivReq(builder ->
            builder.allOf(priv)
                .onAnyColumn(fqTableName.getDb(), fqTableName.getTbl(), tableOwner)
                .build());
      } else {
        registerPrivReq(builder ->
            builder.allOf(priv)
                .onTable(fqTableName.getDb(), fqTableName.getTbl(), tableOwner)
                .build());
      }
    }
    // Propagate the AnalysisException if the table/db does not exist.
    table = getTable(fqTableName.getDb(), fqTableName.getTbl(), /* must_exist */ true);
    ...
    return table;
  }

On the other hand, in InsertStmt#analyze() (https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/InsertStmt.java), we register the column-level privilege request for a column only if the column exists.

  public void analyze(Analyzer analyzer) throws AnalysisException {
    ...
      Column column = table_.getColumn(columnName);
      if (column == null) {
        throw new AnalysisException(
            "Unknown column '" + columnName + "' in column permutation");
      }
      ...
      analyzer.registerPrivReq(builder -> builder
          .allOf(Privilege.INSERT)
          .onColumn(table_.getTableName().getDb(), table_.getTableName().getTbl(),
              column.getName(), table_.getOwnerUser()).build());
    ...
  }

> How about the case when a column does not exist?

I will add a few new test cases for this scenario in the next patch.


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1496
PS7, Line 1496: 
> Thanks for the explanation!
Ack



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 02 Jan 2026 23:41:57 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 19:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21404/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 19
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 15 Jan 2026 03:37:35 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12955/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 17 Jan 2026 06:55:19 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13046/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 03:30:54 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21419/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 20:54:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21:

> Patch Set 21: Verified-1
> 
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12952/

I downloaded the log file of this failed run. The following test failed.

$IMPALA_HOME/bin/impala-py.test \
--junitxml=$IMPALA_EE_TEST_LOGS_DIR/results/test_merge_duplicate_check.xml \
$IMPALA_HOME/tests/query_test/test_iceberg.py::TestIcebergV2Table::test_merge_duplicate_check

The failed query was the following in 

merge into merge_duplicate_check target using functional.alltypes source on (target.id = source.id)
when matched then update set target.bigint_col = target.bigint_col + 1;

I created IMPALA-14688 for this.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 17 Jan 2026 06:54:54 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 20: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12946/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 20
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 08:35:21 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 22:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13018/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 22
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 29 Jan 2026 21:54:33 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 13: Code-Review+1

(4 comments)

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@731
PS7, Line 731:     // rowFilterResult.isRowFilterEnabled() will return false and thus the requesting
> Yes. A test case added by https://gerrit.cloudera.org/c/17230/ (IMPALA-1055
Ack


http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@256
PS13, Line 256: "insert into functional.alltypes (id, string_col) partition " +
              :           "(year, month) values (1, \"abc\", 2026, 12)"
nit: this long string can be extracted as a variable.


http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@458
PS13, Line 458:       // Log the table event even when the table does not exist.
I thought analyze will fail and no events will be generated. How about the case when a column does not exist?


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1496
PS7, Line 1496: 
> The short answer is no.
Thanks for the explanation!



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 13
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 02 Jan 2026 02:22:00 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 15:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21302/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 15
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 02:10:48 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 9:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21227/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 9
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Dec 2025 23:12:43 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 10:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21234/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 10
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 07:24:32 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 16:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21308/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 16
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 21:47:07 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 4:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12619/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 4
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sun, 02 Nov 2025 03:29:32 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#5).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level ones,
   b) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns,
   c) a user is not allowed to insert data into a table if there is a
      deny policy defined on a column of the table against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   d) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   e) we are able to grant, revoke, and show column-level INSERT
      privileges via Impala's coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
10 files changed, 511 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/5
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 5
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 5:

Hi all, please let me know if you have any comment on the patch.

Thank you very much for the help!


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 5
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 05 Nov 2025 00:04:33 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 7:

(1 comment)

Thanks to Quanlong for spotting a bug. I will try to prepare a fix for the bug soon.

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1489
PS7, Line 1489:   def _test_deny_insert_into_column(self, unique_name):
Good catch Quanlong! I think you spotted a bug.

> Can we add another test that if there is a column-masking policy enabled for the user on a column, the user shouldn't be able to insert the column but OK on other columns? IIUC, column-masking policy should block users from modifying the source of the masked data (RANGER-1087).

Assuming that a user was granted the INSERT privilege on a column 'col_1' of a table, the behavior of the current patch does not block this user from inserting data into a column 'col_1', even if there is a column masking policy defined against the user on another column 'col_2' of the same table.

I checked the behavior of Hive Server2 with Ranger being the authorizer, and found that HS2 would block the user from inserting into column 'col_1' in the aforementioned scenario.

I think we need to slightly revise the logic in RangerAuthorizationChecker#authorizeByTableMasking(). Specifically, when the Authorizable refers to a column, we need to additionally check whether or not there is any column masking policy defined on other columns of the same table against the same requesting user.

Don't know if there is a better way, but we may need to add to the class AuthorizableColumn a field of list that consists of all other columns of the same table apart from the column that an instance of AuthorizableColumn corresponds to. This would allow us to check whether there is any other column masking policy defined on any other column of the same table, when authorizeByTableMasking() is invoked.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 7
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 12 Nov 2025 23:31:46 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#2).

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users would like to insert data
into a different set of columns in the same table, e.g., a Kudu table.

This would also allow an administrator to add deny polices on columns
involved in the INSERT statement against a user if we would like to
prevent the user from inserting data into the specified columns.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
3 files changed, 24 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/2
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 1: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12594/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 02:45:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 5:

(2 comments)

Giving my initial review here.

http://gerrit.cloudera.org:8080/#/c/23569/5/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/5/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@158
PS5, Line 158: Set<Privilege> allowedTablePrivileges = EnumSet.of(Privilege.SELECT,
             :               Privilege.INSERT, Privilege.CREATE, Privilege.ALL);
Can you turn this into a constant of ImmutableSet?
See FileSystemUtil.SCHEME_WRITEABLE_BY_IMPALA for example.


http://gerrit.cloudera.org:8080/#/c/23569/5/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/5/tests/authorization/test_ranger.py@1509
PS5, Line 1509:         admin_client.execute("grant insert on table {0}.{1} to user {2}"
              :             .format(unique_database, unique_table, grantee_user))
              :         admin_client.execute("refresh authorization")
              : 
              :         TestRanger._add_deny_policy(unique_name, grantee_user, unique_database,
              :             unique_table, "id", "update")
              :         admin_client.execute("refresh authorization")
              : 
              :         result = self.execute_query_expect_failure(non_owner_client,
              :             test_insert_query)
Can you add comments on these test steps?
I don't quite understand what happen. At first, it was granted insert privilege, then denied update on column 'id', then insert into is expected to fail?

Can you add test inserting into the other column, 'bigint_col', and show that one works?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 5
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 06 Nov 2025 00:14:49 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#6).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level ones,
   b) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns,
   c) a user is not allowed to insert data into a table if there is a
      deny policy defined on a column of the table against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   d) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   e) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
10 files changed, 520 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/6
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 6
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 8: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 20 Nov 2025 05:19:16 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 8:

(4 comments)

In patch set 8, I attempted to address Quanlong's comments and questions. Hopefully I did not miss anything.

Let me know if there are additional suggestions. Thanks!

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/7/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@731
PS7, Line 731:           .table(authorizable.getTableName())
> Should we set the owner here?
Yes. We should set the owner user here.


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1489
PS7, Line 1489:       admin_client.execute("drop database if exists {0} cascade"
> Good catch Quanlong! I think you spotted a bug.
Done


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1496
PS7, Line 1496:     unique_table = unique_name + "_tbl"
> How about UPDATE statement on Kudu and Iceberg tables and MERGE statement o
The short answer is no.

In what follows I provide what privilege requests are registered currently by Apache Impala for those queries mentioned above with concrete examples. For the sake of completeness, I also include UPSERT (against Kudu tables).

Assume that we have 1 Kudu table 'kudu_table_01' and 2 Iceberg tables 'iceberg_table_01' and 'iceberg_table_02' that have the same schema (id int, bool_col boolean, string_col string).

1) UPDATE kudu_table_01 SET bool_col = true WHERE id = 1
- SELECT and ALL privileges on the table 'kudu_table_01'.
- SELECT privileges on the columns 'id' and 'bool_col'.

Those privilege requests are registered during ModifyStmt#analyze() (https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/ModifyStmt.java) and it looks like InsertStmt#analyze() is not involved.

2) UPDATE iceberg_table_01 SET bool_col = true WHERE id = 1
- SELECT and ALL privileges on the table 'iceberg_table_01'.
- SELECT privileges on all the columns in the table, including the column of 'string_col' even though it's not referenced explicitly in the query.

The privilege request for each column is registered because in IcebergUpdateImpl#buildAndValidateSelectExprs()   (https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/IcebergUpdateImpl.java), we call createSlotRef() for each column in modifyStmt_.table_.getColumns().

Similarly, InsertStmt#analyze() does not seem to be involved.

3) 
MERGE INTO iceberg_table_02 USING iceberg_table_01 
ON iceberg_table_02.id = iceberg_table_01.id 
WHEN NOT MATCHED THEN 
INSERT (string_col) VALUES (iceberg_table_01.string_col)

- SELECT and ALL privileges on the table 'iceberg_table_02' (destination table).
- SELECT privilege on each column in the table 'iceberg_table_02'.
- SELECT privilege on the table 'iceberg_table_01' (source table).
- SELECT privilege on each column in the table 'iceberg_table_01'.

We register the SELECT privilege on each column of the destination table because we call registerSlotRef() for each column in icebergTable_.getColumns() in IcebergMergeImpl#analyze() (https://github.com/apache/impala/tree/master/fe/src/main/java/org/apache/impala/analysis/IcebergMergeImpl.java).

We register the SELECT privilege on each column of the source table because we invoke queryStmt_.analyze(analyzer) in IcebergMergeImpl#analyze() where 'queryStmt_' is a SelectStmt.

InsertStmt#analyze() does not seem to be involved here either.

4) UPSERT INTO kudu_table_01 (id, string_col) values (1, 'Alice')
- ALL privilege on the table.
- INSERT privileges on the columns of 'id' and 'string_col'. We register them due to this patch.

Note that the ALL privilege is registered in InsertStmt#analyzeTargetTable().


http://gerrit.cloudera.org:8080/#/c/23569/7/tests/authorization/test_ranger.py@1508
PS7, Line 1508:         .format(grantee_user))
              : 
> Can we also add tests for partitioned tables and Iceberg tables?
Yes we could. Will add them in the next patch.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 20 Nov 2025 00:42:39 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 16:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12881/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 16
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 21:21:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 19: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 19
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 00:49:31 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 9:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12831/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 9
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Dec 2025 22:47:55 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21584/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 03:54:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 19:

I updated the expected errors in some front-end and end-to-end tests and triggered https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3354/. Will address the comments on patch set 17 provided by Csaba and add more code comments once the Jenkins run is successful.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 19
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 15 Jan 2026 02:36:43 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 20:

(3 comments)

In patch set 19, I addressed Csaba's comments on patch set 18, and added more commit messages describing the changes to the Preconditions checks in BaseAuthorizationChecker#analyze().

Let me know if there are more suggestions. Thanks!

http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1521
PS18, Line 1521:     table_prefix = "tbl"
> Yeah. I think we could do as you suggested.
I just realized we also use 'unique_name' to construct the names of the deny policies added in the test.

So, maybe we could still use unique_name instead of unique_database, and construct fixed table names, e.g., 'tbl', and 'tbl_iceberg'.


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1539
PS18, Line 1539:         admin_client.execute("create database {0}".format(unique_database))
               : 
> I guess we always assume that when we are running an end-to-end test that w
Done


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1598
PS18, Line 1598:                 unique_database, tbl, "*", "update")
> Yes we could move this to the previous finally block. I will address this i
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 20
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 02:54:36 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 23:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13035/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 23
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 15:38:28 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 11:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12838/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 22:24:11 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 5:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20814/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 5
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 04 Nov 2025 23:06:33 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 6:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20840/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 6
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 06 Nov 2025 19:48:30 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 8:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12696/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 20 Nov 2025 00:45:01 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 2: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12597/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 23:21:33 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 3:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20777/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sat, 25 Oct 2025 19:33:28 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 18:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@156
PS14, Line 156:             // We allow the ALL privilege because for the UPSERT operation against Kudu
              :             // tables, we set the required privilege to ALL since we don't have an UPSERT
              :             // privilege yet. Refer to InsertStmt#analyzeTargetTable().
              :             // CREATE privilege would be registered in CreateTableAsSelectStmt#analyze().
              :             // In addition, VIEW_METADATA privilege would be registered in
              :             // CopyTestCaseStmt#analyze().
              :             Preconditions.checkState(ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES
              :                 .contains(privReq.getPrivilege()));
              :             requests = tablePrivReqs.computeIfAbsent(tableName, k -> new ArrayList<>());
              :             requests.add(privReq);
              :           } else {
              :             Preconditions.checkState(privReq.getAuthorizable().getType() == Type.COLUMN);
              :             requests = columnPrivReqs.computeIfAbsent(ta
> The revised condition suggested by me above would actually fail the followi
I am also thinking about why we added this Preconditions check in the first place.

One reason I could think of right now is that by ensuring that the table-level privilege request always precedes the column-level privilege requests for a given table, we could save some time spent on authorization via short circuiting. That is, when the requesting user is granted the required privilege on the given table, we could just skip the authorization of the columns in this table. 
This was true until https://github.com/apache/impala/commit/b37dd05e8f35bba5d9126ef79b35c1831f966f1b (IMPALA-8933: Enforce ranger deny policy). However, it's no longer clear to me if we still need this Preconditions check after IMPALA-8933.

I could try to keep this Preconditions check, but just want to point out that removing this check could possibly be an option too.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Tue, 13 Jan 2026 02:57:53 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#20).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

On the other hand, this patch slightly revises the Preconditions checks
in BaseAuthorizationChecker#analyze() so that it would be easier to
understand what those checks verify. The code comment there explicitly
mentions that for a statement that may produce several hierarchical
privilege requests, it should always have a corresponding table-level
privilege request if it has a column-level privilege request. This is
not entirely true and could not be detected by the previous checks.
Specifically, for the CREATE TABLE <db>.<target_tbl> AS SELECT
statement, we would register an ANY privilege request for the column
with wildcard table and column names denoting any column and table in
the database the target table belongs, i.e., '<db>.*.*', whereas there
was no privilege request for the table '<db>.*' registered. This patch
corrects this by registering an ANY privilege request for the database
of the target table instead. Due to this, we also changed the expected
error messages for some Java and end-to-end authorization-related tests.
This should not affect the security in that the resulting
RangerResourceImpl sent to the Ranger plug-in is the same whether the
privilege request is an ANY privilege request for the wildcard column
'<db>.*.*' or an ANY privilege request for the database '<db>'. Refer to
RangerAuthorizationChecker#authorizeResource() for more details.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 756 insertions(+), 149 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/20
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 20
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 20:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12946/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 20
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 16 Jan 2026 02:52:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 19:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12933/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 19
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 15 Jan 2026 02:32:39 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 8:

Added Csaba as a reviewer too in case Csaba is also interested in this patch.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 16 Dec 2025 04:49:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 15:

I have addressed reviewers' comments on patch set 14, and triggered https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3331/ against patch set 15. Hopefully this dryrun would be successful.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 15
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 01:49:28 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#21).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

On the other hand, this patch slightly revises the Preconditions checks
in BaseAuthorizationChecker#authorize() so that it is easier to
understand what those checks verify. The code comment there explicitly
mentions that for a statement that may produce several hierarchical
privilege requests, it should always have a corresponding table-level
privilege request if it has a column-level privilege request. This was
not entirely true and could not be detected by the previous checks.
Specifically, for the CREATE TABLE <db>.<target_tbl> AS SELECT
statement, we would register an ANY privilege request for the column
with wildcard table and column names denoting any column and table in
the database the target table belongs, i.e., '<db>.*.*', whereas there
was no privilege request for the table '<db>.*' registered. This patch
corrects this by registering an ANY privilege request for the database
of the target table instead. Due to this, we also changed the expected
error messages for some Java and end-to-end authorization-related tests.
This should not affect the security in that the resulting
RangerResourceImpl sent to the Ranger plug-in is the same whether the
privilege request is an ANY privilege request for the wildcard column
'<db>.*.*' or an ANY privilege request for the database '<db>'. Refer to
RangerAuthorizationChecker#authorizeResource() for more details.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 753 insertions(+), 149 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/21
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 17 Jan 2026 12:32:01 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 21: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23569/21//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23569/21//COMMIT_MSG@15
PS21, Line 15: polices
nit: "policies"



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 21
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Wed, 21 Jan 2026 07:26:43 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table. Moreover, column-level
Ranger audit events for INSERT requests will be produced after this
patch.

This would also allow an administrator to add deny policies on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

On the other hand, this patch slightly revises the Preconditions checks
in BaseAuthorizationChecker#authorize() so that it is easier to
understand what those checks verify. The code comment there explicitly
mentions that for a statement that may produce several hierarchical
privilege requests, it should always have a corresponding table-level
privilege request if it has a column-level privilege request. This was
not entirely true and could not be detected by the previous checks.
Specifically, for the CREATE TABLE <db>.<target_tbl> AS SELECT
statement, we would register an ANY privilege request for the column
with wildcard table and column names denoting any column and table in
the database the target table belongs, i.e., '<db>.*.*', whereas there
was no privilege request for the table '<db>.*' registered. This patch
corrects this by registering an ANY privilege request for the database
of the target table instead. Due to this, we also changed the expected
error messages for some Java and end-to-end authorization-related tests.
This should not affect the security in that the resulting
RangerResourceImpl sent to the Ranger plug-in is the same whether the
privilege request is an ANY privilege request for the wildcard column
'<db>.*.*' or an ANY privilege request for the database '<db>'. Refer to
RangerAuthorizationChecker#authorizeResource() for more details.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Reviewed-on: http://gerrit.cloudera.org:8080/23569
Reviewed-by: Quanlong Huang <hu...@gmail.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Csaba Ringhofer <cs...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
M tests/authorization/test_ranger.py
14 files changed, 720 insertions(+), 121 deletions(-)

Approvals:
  Quanlong Huang: Looks good to me, but someone else must approve
  Impala Public Jenkins: Verified
  Csaba Ringhofer: Looks good to me, approved

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 25
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 17:

> Patch Set 17: Verified-1
> 
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12887/

The following Java test failed.

 (pushd fe && mvn test -Dtest=AuditingTest#TestCreateTable)

This is because I changed the following line in CreateTableAsSelectStmt.java from

 "FeDb db = analyzer.getDb(createStmt_.getDb(), Privilege.ANY);"

to

 "FeDb db = analyzer.getDb(createStmt_.getDb(), /* throwIfDoesNotExist */ false);".

The former statement would register an access event, but the latter statement does not.

 addAccessEvent(new TAccessEvent(dbName, TCatalogObjectType.DATABASE,
        privilege.toString()));

When we call getDb(createStmt_.getDb(), Privilege.ANY) in CreateTableAsSelectStmt#analyze(), we would register a privilege request like the following, which would fail the Preconditions check proposed in patch set 17 in that there won't be any privilege request for an AuthorizableTable with name being "<db_name>.*".

 privReq = {PrivilegeRequest@9473} 
  authorizable_ = {AuthorizableColumn@9474} 
   columnName_ = "*"
   dbName_ = "test_db_10"
   tableName_ = "*"
   ownerUser_ = "admin"
   columns_ = {ArrayList@9475}  size = 0
  privilege_ = {Privilege@7676} "ANY"

Notice that in BaseAuthorizationChecker#analyze(), we explicitly mention the following and a privilege request like the above apparently contradicts the code comment.

 // Authorize statements that may produce several hierarchical privilege requests.
 // Such a statement always has a corresponding table-level privilege request if it
 // has column-level privilege request.

Don't know what else we need to change if we change the code in getDb(String dbName, Privilege privilege, boolean throwIfDoesNotExist, boolean requireGrantOption) to execute "builder.any().onDb(dbName, dbOwner).build()" instead of "builder.any().onAnyColumn(dbName, dbOwner).build()". These 2 statements seem to register privilege requests with different semantic meaning.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 10 Jan 2026 06:32:00 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 17:

In patch set 17, I revised the Preconditions check in BaseAuthorizationChecker.java in patch set 16 to make the check a little bit relaxed so that we would allow the case where a column-level privilege request could be registered before its respective table-level privilege request.


I also changed the following line in CreateTableAsSelectStmt.java from

  "FeDb db = analyzer.getDb(createStmt_.getDb(), Privilege.ANY);"

to

  "FeDb db = analyzer.getDb(createStmt_.getDb(), /* throwIfDoesNotExist */ false);".

The previous statement would register a AuthorizableColumn for a wildcard column name "<db_name>.*.*" with privilege being ANY. But we don't really register a AuthorizableTable for "<db_name>.*". It's not entirely clear to me if registering this ANY privilege is required.

I also triggered https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3335/ against patch set 17 so we could have an idea about whether the latest Preconditions check would cause any regression. I feel like we are opening a can of worms here.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 08 Jan 2026 23:27:16 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 14:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@256
PS13, Line 256: 4, events.size());
              :       assertEventEquals("@column", "insert", "functiona
> Sure. I will make this a variable in the next patch.
Done


http://gerrit.cloudera.org:8080/#/c/23569/13/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@458
PS13, Line 458:           "values (1, 1)", events.get(0).getRequestData());
> Thanks Quanlong!
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 02 Jan 2026 23:43:22 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 19:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12943/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 19
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Thu, 15 Jan 2026 18:59:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: [WIP] Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: [WIP] Register column-level privilege requests for INSERT
......................................................................


Patch Set 2:

(1 comment)

gerrit-auto-critic failed. You can reproduce it locally using command:

  python3 bin/jenkins/critique-gerrit-review.py --dryrun

To run it, you might need a virtual env with Python3's venv installed.

http://gerrit.cloudera.org:8080/#/c/23569/2/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/2/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java@160
PS2, Line 160: //            LOG.info("resource type of req(0): " + requests.get(0).getAuthorizable().getType().toString());
line too long (109 > 90)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Oct 2025 18:39:31 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24:

(4 comments)

I have tried to address Csaba's and Quanlong's comments. Let me know if there are additional ideas.

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG@9
PS23, Line 9: This patch registers column-level privilege requests for columns
            : involved in the INSERT statement so that the requesting user does not
            : need to be granted the INSERT privilege on the entire table.
> What happens if the DML inserts into all columns? Will Impala register requ
Yes. In this case, Impala will register 1 table-level INSERT request, and 1 column-level INSERT request for each column in the table. This is consistent with what we have seen in the test case at https://gerrit.cloudera.org/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java#169.


http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG@56
PS23, Line 56:       columns given that there is no deny policy on those columns and
             :       no column masking policy on any column of the 
> Can you mention this change also earlier in the commit message?

Yes I will mention this earlier in the commit message in the next patch.

> BTW can't this increase the number of audit log entries drastically?

When an INSERT query fails the authorization, there will be only one single Ranger audit log entry produced.

When the authorization is successful, it depends on the number of Ranger policies covering the columns of the target table.

- If we define 1 Ranger policy for each column in the target table, then the number of audit log entries would be the number of columns in the target table. This is verified by the test case at https://gerrit.cloudera.org/c/23569/23/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java#187.

- But if we define 1 single Ranger policy covering all the columns in the target table, then there will only be one Ranger audit log entry. I could add to testAuditLogSuccess() a test case verifying this in the next patch.

- Alternatively, we could just grant the INSERT privilege on the entire target table to the requesting user. In this case, there will be 2 Ranger audit log entries produced. One corresponds to the table-level INSERT request, and the other corresponds to all the column-level INSERT requests of the target table. This is seen at https://gerrit.cloudera.org/c/23569/23/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java#125.

> Do you know if Hive works the same?

The short answer is not exactly the same but the difference should be acceptable.

I briefly verified this on a cluster where Hive used a RangerHiveAuthorizer similar to  https://github.com/apache/ranger/blob/5ea59e0/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java to perform authorization.

- If we define 1 Ranger policy for each column in the target table, then the number of audit log entries produced by Hive would be the number of columns in the target table. Note that each produced audit log entry has its respective policy id. This is the same as what is seen in Impala.

- If we define 1 single Ranger policy covering all the columns in the target table, then there will only be one Ranger audit log entry produced by Hive. This is the same as what is seen in Impala.

- If we define 1 single Ranger policy granting the INSERT privilege on the entire target table to the requesting user, then there will only be one Ranger audit log entry produced by Hive. This is different from what we have seen in Impala.


http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@763
PS23, Line 763: trac
> nit: this might be too verbose if we log it for all the columns.
Sure. I will change this to trace() in the next patch.


http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
File fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java:

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java@660
PS23, Line 660:             "  \"name\": \"%s\",\n" +
> optional: using multiline strings (""") would make this more readable
I am not very sure if we could use multi-line strings/text blocks without changing any pom.xml files. My $JAVA_HOME is /usr/lib/jvm/java-17-openjdk-amd64, which seems to be the same as the $JAVA_HOME at https://jenkins.impala.io/job/ubuntu-20.04-from-scratch/7980/consoleFull against https://gerrit.cloudera.org/c/23916/ (IMPALA-13921: Make Java 17 the default in tests). Maybe I missed something important? The error message I saw was the following.

 18:57:37 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.14.0:testCompile (default-testCompile) on project impala-frontend: Compilation failure
 18:57:37 [ERROR] /home/fangyurao/Impala_for_FE/fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java:[695,25] text blocks are not supported in -source 8
 18:57:37 [ERROR]   (use -source 15 or higher to enable text blocks)

I already prepared a text block like the following. So if it's not too difficult to add this text block, then I will do so. If it turns out updating some pom.xml files is required, then maybe that should be done in a separate patch since using multi-line strings is orthogonal to the purpose of this patch.

    String policyJson = """
        {
          "name": "%s",
          "policyType": 0,
          "serviceType": "%s"
          "service": "%s"
          "resources": {
            "database": {
              "values": [
                "%s"
              ],
              "isExcludes": false,
              "isRecursive": false
            },
            "table": {
              "values": [
                "%s"
              ],
              "isExcludes": false,
              "isRecursive": false
            },
            "column": {
              "values": [
                "%s"
              ],
              "isExcludes": false,
              "isRecursive": false
            },
            "denyPolicyItems": [
              {
                "accesses": [
                  {
                    "type": "%s",
                    "isAllowed": true
                  }
                ],
                "users": [
                  "%s"
                ]
              }
            ]
        }
        """.formatted(policyName, RANGER_SERVICE_TYPE, RANGER_SERVICE_NAME, databaseName,
        tableName, columnName, accessType, user);



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 03:30:08 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Riza Suminto, Noemi Pap-Takacs, Csaba Ringhofer, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23569

to look at the new patch set (#14).

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................

IMPALA-14507: Register column-level privilege requests for INSERT

This patch registers column-level privilege requests for columns
involved in the INSERT statement so that the requesting user does not
need to be granted the INSERT privilege on the entire table. This would
be helpful in the case when different users are allowed to insert data
into different sets of columns in the same table.

This would also allow an administrator to add deny polices on columns
against a user if we would like to prevent the user from inserting data
into the specified columns.

Testing:
 - Added frontend and end-to-end tests to verify that
   a) we register column-level privilege requests in the INSERT
      statement in addition to the table-level one,
   b) a user is not allowed to insert data into a column of a table
      if there is a deny policy defined on the column against the user,
      even though the user was already granted the INSERT privilege on
      the table,
   c) a user is not allowed to insert data into a column if there is a
      column masking policy defined on any column of the same table,
      even though the user was already granted the INSERT privilege on
      the table (RANGER-1087 and IMPALA-10554),
   d) a user is allowed to insert data into a set of columns of a table
      as long as the user was granted the INSERT privileges on those
      columns given that there is no deny policy on those columns and
      no column masking policy on any column of the same table,
   e) column-level Ranger audit events could be produced after the
      introduction of column-level INSERT privilege,
   f) we are able to grant, revoke column-level INSERT privileges via
      the catalog server, and show column-level INSERT privileges via a
      coordinator.

Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableColumn.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizableTable.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationContext.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M tests/authorization/test_ranger.py
12 files changed, 783 insertions(+), 125 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/23569/14
-- 
To view, visit http://gerrit.cloudera.org:8080/23569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 14
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 25:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23569/23//COMMIT_MSG@56
PS23, Line 56:       columns given that there is no deny policy on those columns and
             :       no column masking policy on any column of the 
> Thanks for the detailed explanation! I am not too familiar with the audit l
Ack


http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
File fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java:

http://gerrit.cloudera.org:8080/#/c/23569/23/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java@763
PS23, Line 763: trac
> Sure. I will change this to trace() in the next patch.
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 25
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 18:32:47 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 24:

Submitting as there are no other commits since the last succesful gvo


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 24
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 09:16:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 8:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20993/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 8
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 20 Nov 2025 01:07:55 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 9: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 9
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 24 Dec 2025 03:43:14 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 11:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21235/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 11
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Dec 2025 07:41:45 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 16:

I triggered https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3332/ against patch set 16 after adding two additional allowed table-level privileges (ALTER and VIEW_METADATA) to ALLOWED_HIER_AUTHZ_TABLE_PRIVILEGES in BaseAuthorizationChecker.java to pass the failed tests in https://jenkins.impala.io/job/gerrit-verify-dryrun-external/3331/. Hopefully this time the pre-commit run will be successful.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 16
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 21:24:31 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 15:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12878/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 15
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 01:47:16 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 16: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12881/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 16
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Thu, 08 Jan 2026 02:19:18 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 18:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12903/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Sat, 10 Jan 2026 06:40:11 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 18:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/23569/17/fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java
File fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java:

http://gerrit.cloudera.org:8080/#/c/23569/17/fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java@212
PS17, Line 212:     // The full privilege check for the database will be done as part of the INSERT
              :     // analysis.
              :     FeDb db = analyzer.getDb(createStmt_.getDb(), Privilege.ANY);
I am not sure if this is correct - if the user does not have any privilege on a db name, then they shouldn't be able to learn whether it exists or not - or the authorization was already done before this?


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1521
PS18, Line 1521:     unique_table = unique_name + "_tbl"
Is it really needed to use a random name? Can't we just use unique_database and create tables with fixed names in it?


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1539
PS18, Line 1539:         admin_client.execute("drop database if exists {0} cascade"
               :             .format(unique_database))
This shouldn't be needed as the name is unique


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1598
PS18, Line 1598:             TestRanger._remove_policies(unique_database, tbl, "*")
Shouldn't we do this in the previous finally block, if the policy was created in that try block?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Mon, 12 Jan 2026 12:06:41 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14507: Register column-level privilege requests for INSERT

Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23569 )

Change subject: IMPALA-14507: Register column-level privilege requests for INSERT
......................................................................


Patch Set 18:

(4 comments)

I replied to Csaba's comments. Will try to prepare patch set 19 based on the discussion.

This patch becomes more involved than I first expected, especially the Preconditions check as discussed at https://gerrit.cloudera.org/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java#168.

http://gerrit.cloudera.org:8080/#/c/23569/17/fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java
File fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java:

http://gerrit.cloudera.org:8080/#/c/23569/17/fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java@212
PS17, Line 212:     // The full privilege check for the database will be done as part of the INSERT
              :     // analysis.
              :     FeDb db = analyzer.getDb(createStmt_.getDb(), Privilege.ANY);
> I am not sure if this is correct - if the user does not have any privilege on a db name, then they shouldn't be able to learn whether it exists or not - or the authorization was already done before this?

With "FeDb db = analyzer.getDb(createStmt_.getDb(), /* throwIfDoesNotExist */ false)", for a query like "create table test_db_10.alltypestiny_id as select id from functional.alltypestiny" submitted by a user, e.g., non_owner, that does not have any privilege, the following error message will be returned, when the target table 'test_db_10.alltypestiny_id' does not exist.

 AuthorizationException: User 'non_owner' does not have privileges to execute 'CREATE' on: test_db_10

Without this change (patch set 16), the error message was the following.

 AuthorizationException: User 'non_owner' does not have privileges to execute 'CREATE' on: test_db_10

The error messages are the same before and after this line of change, and in this case whether the target table exists or not is not revealed.

This is because Impala's authorization checker processes the CREATE privilege on the table 'test_db_10.alltypestiny_id' first during authorization. When the requesting user does not have the necessary (CREATE) privilege on this (non-existing) table, i.e., hasAccess() returns false, the branch of "privilege == Privilege.CREATE" in BaseAuthorizationChecker#checkAccess() would be exercised.

  private void checkAccess(AuthorizationContext authzCtx, User user,
      PrivilegeRequest privilegeRequest)
      throws AuthorizationException, InternalException {
    Preconditions.checkNotNull(privilegeRequest);

    if (hasAccess(authzCtx, user, privilegeRequest)) return;
      ...
    } else if (privilege == Privilege.CREATE &&
        privilegeRequest.getAuthorizable().getType() == Type.TABLE) {
      // Creating a table requires CREATE on a database and we shouldn't
      // expose the table name.
      throw new AuthorizationException(String.format(
          "User '%s' does not have privileges%s to execute '%s' on: %s",
          user.getName(), grantOption(privilegeRequest.hasGrantOption()), privilege,
          privilegeRequest.getAuthorizable().getDbName()));
    ...
  }

On the other hand, getDb(String dbName, Privilege privilege) in https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/Analyzer.java also does the following.

     addAccessEvent(new TAccessEvent(dbName, TCatalogObjectType.DATABASE,
        privilege.toString()));

So with this line of change, one fewer access event will be logged. I guess/think this is not what we want.

Therefore, I am more inclined to do without this line of change in patch set 17.

However, without this change, we will have to think about what privilege request to register in getDb(String dbName, Privilege privilege). Note that with patch set 16, we would register the following.

 privReq = {PrivilegeRequest@9473} 
  authorizable_ = {AuthorizableColumn@9474} 
   columnName_ = "*"
   dbName_ = "test_db_10"
   tableName_ = "*"
   ownerUser_ = "admin"
   columns_ = {ArrayList@9475}  size = 0
  privilege_ = {Privilege@7676} "ANY"

This privilege could be thought of as a wildcard privilege request representing any column of any table under the database 'test_db_10', which clearly contradicts the following code comment in authorize(AuthorizationContext authzCtx, AnalysisResult analysisResult, FeCatalog catalog) of https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java because we do not register any respective wildcard privilege request for the table 'test_db_10.*'.

    // Authorize statements that may produce several hierarchical privilege requests.
    // Such a statement always has a corresponding table-level privilege request if it
    // has column-level privilege request.

We could not catch this with the following Preconditions check as discussed at https://gerrit.cloudera.org/c/23569/14/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java#168.

          Preconditions.checkState((requests.isEmpty() ||
              !(privReq.getAuthorizable().getType() == Authorizable.Type.COLUMN)) ||
              (requests.get(0).getAuthorizable().getType() == Authorizable.Type.TABLE &&
                  requests.get(0).getPrivilege() == Privilege.SELECT));

In https://gerrit.cloudera.org/c/23569/18/fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java, I proposed a revised Preconditions check, and changed the registered privilege request to an ANY request on the database 'test_db_10'. Patch set 18 failed some existing authorization-related tests, but I will take a closer look to verify if there is some security-related issue about the proposed changes in patch set 18.


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:

http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1521
PS18, Line 1521:     unique_table = unique_name + "_tbl"
> Is it really needed to use a random name? Can't we just use unique_database
Yeah. I think we could do as you suggested.


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1539
PS18, Line 1539:         admin_client.execute("drop database if exists {0} cascade"
               :             .format(unique_database))
> This shouldn't be needed as the name is unique
I guess we always assume that when we are running an end-to-end test that would create a 'unique_database', there is not already a database with the same name. In this case, we could remove this in the next patch set.


http://gerrit.cloudera.org:8080/#/c/23569/18/tests/authorization/test_ranger.py@1598
PS18, Line 1598:             TestRanger._remove_policies(unique_database, tbl, "*")
> Shouldn't we do this in the previous finally block, if the policy was creat
Yes we could move this to the previous finally block. I will address this in the next patch set.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ef61801d3b394c56702b193c250492a62b111df
Gerrit-Change-Number: 23569
Gerrit-PatchSet: 18
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <np...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Comment-Date: Mon, 12 Jan 2026 22:53:57 +0000
Gerrit-HasComments: Yes