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 2026/04/02 05:47:22 UTC
[Impala-ASF-CR] IMPALA-14875: [WIP] Lowercase table name when registering column privilege
Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24165
Change subject: IMPALA-14875: [WIP] Lowercase table name when registering column privilege
......................................................................
IMPALA-14875: [WIP] Lowercase table name when registering column privilege
Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
---
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/24165/1
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
Patch Set 2: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
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: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Fri, 03 Apr 2026 05:26:55 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
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: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Sat, 04 Apr 2026 03:12:03 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
Patch Set 2:
Hi all, please let me know if there is any comment on the fix. Thanks very much for the help!
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
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: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 03 Apr 2026 00:52:32 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14875: [WIP] Lowercase table name when registering column privilege
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: [WIP] Lowercase table name when registering column privilege
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/22070/ : 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/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 02 Apr 2026 06:09:21 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Yida Wu (Code Review)" <ge...@cloudera.org>.
Yida Wu has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
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: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Fri, 03 Apr 2026 04:48:13 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/22077/ : 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/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
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: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 03 Apr 2026 01:14:34 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
In IMPALA-14507, we slightly revised a Preconditions check that requires
each column-level privilege request has at least one respective
table-level privilege request. However, we found that this introduced a
regression due to which the check would fail in the local catalog mode
if the name of the target table in the CREATE TABLE AS SELECT statement
contains uppercase letters. For instance, a query like the following
would fail in the local catalog mode.
create table alltypes_A as select int_col from functional.alltypes;
One root cause of this was that during the registration of the
column-level INSERT privilege in InsertStmt#analyze(),
table_.getTableName().getTbl() would still contain uppercase letters in
the local catalog mode. As a result, during the Preconditions check in
BaseAuthorizationChecker#authorize(), the key of the same table in the
map from table name to the associated table-level privilege requests
did not match that in the map from table name to the associated
column-level privilege requests, causing the check to fail. In our
example, the key of the target table in the former map would end with
"alltypes_a", whereas that of the latter map ended with "alltypes_A".
To fix the issue, this patch lowercases the table name when constructing
the 2 maps above.
On a related note, the issue only affected the CTAS statement but not
the INSERT statement. This is because during the analysis of the CTAS
statement in the local catalog mode, we create a temporary target table
'table_' such that table_.getTableName().getTbl() could still contain
uppercase letters and then call InsertStmt#analyze() with 'table_' being
the target table. For the INSERT statement, the name of the target table
is already lowercased for both catalog modes.
Testing:
- Added test cases to verify that a CTAS statement could pass the
Preconditions check even though the name of target table has
capital letters.
Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Reviewed-on: http://gerrit.cloudera.org:8080/24165
Reviewed-by: Yida Wu <wy...@gmail.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Michael Smith <mi...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M testdata/workloads/functional-query/queries/QueryTest/create-table-as-select.test
2 files changed, 29 insertions(+), 4 deletions(-)
Approvals:
Yida Wu: Looks good to me, but someone else must approve
Impala Public Jenkins: Verified
Michael Smith: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 3
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: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
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/24165
to look at the new patch set (#2).
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
In IMPALA-14507, we slightly revised a Preconditions check that requires
each column-level privilege request has at least one respective
table-level privilege request. However, we found that this introduced a
regression due to which the check would fail in the local catalog mode
if the name of the target table in the CREATE TABLE AS SELECT statement
contains uppercase letters. For instance, a query like the following
would fail in the local catalog mode.
create table alltypes_A as select int_col from functional.alltypes;
One root cause of this was that during the registration of the
column-level INSERT privilege in InsertStmt#analyze(),
table_.getTableName().getTbl() would still contain uppercase letters in
the local catalog mode. As a result, during the Preconditions check in
BaseAuthorizationChecker#authorize(), the key of the same table in the
map from table name to the associated table-level privilege requests
did not match that in the map from table name to the associated
column-level privilege requests, causing the check to fail. In our
example, the key of the target table in the former map would end with
"alltypes_a", whereas that of the latter map ended with "alltypes_A".
To fix the issue, this patch lowercases the table name when constructing
the 2 maps above.
On a related note, the issue only affected the CTAS statement but not
the INSERT statement. This is because during the analysis of the CTAS
statement in the local catalog mode, we create a temporary target table
'table_' such that table_.getTableName().getTbl() could still contain
uppercase letters and then call InsertStmt#analyze() with 'table_' being
the target table. For the INSERT statement, the name of the target table
is already lowercased for both catalog modes.
Testing:
- Added test cases to verify that a CTAS statement could pass the
Preconditions check even though the name of target table has
capital letters.
Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
---
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M testdata/workloads/functional-query/queries/QueryTest/create-table-as-select.test
2 files changed, 29 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/24165/2
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
[Impala-ASF-CR] IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24165 )
Change subject: IMPALA-14875: Make a Preconditions check case-insensitive in authorize()
......................................................................
Patch Set 2:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13298/ DRY_RUN=true
--
To view, visit http://gerrit.cloudera.org:8080/24165
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfae24a7de8da683bc0bf28a947188ab96481301
Gerrit-Change-Number: 24165
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Apr 2026 00:50:54 +0000
Gerrit-HasComments: No