Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
This cause Sentry throws "No valid privileges" error:
Error: Error while compiling statement: FAILED: SemanticException No valid privileges.
To reproduce:
Enable sentry:
create table t1( i int);
create view v1 as select * from t1;
create view v2 as select * from v1 union all select * from v1;
If the user does not have read permission on t1 and v1, the query
select * from v2;
This will fail with:
Error: Error while compiling statement: FAILED: SemanticException No valid privileges
User foo does not have privileges for QUERY
The required privileges: Server=server1->Db=database2->Table=v1->action=select; (state=42000,code=40000)
Sentry should not check v1's permission, for v1 has at least one parent(v2).