[
https://issues.apache.org/jira/browse/HIVE-28541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
shuaiqi.guo updated HIVE-28541:
-------------------------------
Description:
when generating ReadEntity for function doAuthorization(), the materialized CTE
will be parsed as Table, like the following sql:
{code:java}
-- hive.security.authorization.enabled should be set to true.
set hive.optimize.cte.materialize.threshold=1;
with aaa as ( select 1) select * from aaa; {code}
then we will get the following Exception:
{code:java}
Error: Error while compiling statement: FAILED: HiveAuthzPluginException Error
getting object from metastore for Object [type=TABLE_OR_VIEW, name=test_db.aaa]
(state=42000,code=40000) {code}
was:TheĀ
> Incorrectly treating materialized CTE as Table when privilege checking
> ----------------------------------------------------------------------
>
> Key: HIVE-28541
> URL: https://issues.apache.org/jira/browse/HIVE-28541
> Project: Hive
> Issue Type: Bug
> Security Level: Public(Viewable by anyone)
> Components: Logical Optimizer, Parser, Query Planning
> Affects Versions: 2.3.5, 3.1.2
> Reporter: shuaiqi.guo
> Priority: Major
>
> when generating ReadEntity for function doAuthorization(), the materialized
> CTE will be parsed as Table, like the following sql:
> {code:java}
> -- hive.security.authorization.enabled should be set to true.
> set hive.optimize.cte.materialize.threshold=1;
> with aaa as ( select 1) select * from aaa; {code}
> then we will get the following Exception:
> {code:java}
> Error: Error while compiling statement: FAILED: HiveAuthzPluginException
> Error getting object from metastore for Object [type=TABLE_OR_VIEW,
> name=test_db.aaa] (state=42000,code=40000) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)