Impala Public Jenkins has submitted this change and it was merged. ( https://gerrit.cloudera.org/25078 )
Change subject: IMPALA-15500, IMPALA-15533: Register column-level privilege requests in USING ...................................................................... IMPALA-15500, IMPALA-15533: Register column-level privilege requests in USING This makes ImpalaSqlValidatorImpl register the privilege requests for the columns of actual tables/views in the USING clause. For instance, before this patch, for the following query, ImpalaSqlValidatorImpl would only register the request for the SELECT privilege on the table 'functional.alltypestiny', which requires the requesting user to have the SELECT privilege on the table to execute the query, even though only the column 'id' of 'functional.alltypestiny' was needed for executing the query. After this patch, we additionally register the request for the SELECT privilege on the column 'id' of 'functional.alltypestiny'. Therefore, it suffices to have the SELECT privilege on the referenced column to execute the query (v.s. on the whole table). with alltypes as (select 100 as id) select alltypes.id from alltypes join functional.alltypestiny using (id) This also fixes a bug introduced in IMPALA-14488 so we will run test_select_calcite_frontend() and test_view_on_view_all_configs() against the Calcite planner by default. Testing: - Added test cases to test_select_calcite_frontend() to make sure we register the privilege requests for a column of an actual table/view in the USING clause. Change-Id: Ia49fc01fc45408649b36441c436038921dbb9451 Reviewed-on: https://gerrit.cloudera.org/25078 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java M tests/authorization/test_ranger.py 2 files changed, 199 insertions(+), 20 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit https://gerrit.cloudera.org/25078 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia49fc01fc45408649b36441c436038921dbb9451 Gerrit-Change-Number: 25078 Gerrit-PatchSet: 13 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]>
