[
https://issues.apache.org/jira/browse/SENTRY-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999787#comment-14999787
]
Anne Yu commented on SENTRY-950:
--------------------------------
Add tests:
{code}
create table test_tb(s STRING, i INT);
insert into table test_tb values("Test", 1);
grant select(s) on table test_tb to role test_role;
{code}
1. test order by:
{noformat}select s from test_tb order by s {noformat} -> should pass;
{noformat}select s from test_tb order by i {noformat} -> should fail with
permission exception;
{noformat}select s from test_tb sort by i {noformat} -> should fail with
permission exception;
2. test group by:
{noformat}select count(s) from test_tb group by s {noformat} -> should pass;
{noformat}select count(s) from test_tb group by i {noformat} -> should fail
with "SemanticException No valid privileges"
{noformat}select s from test_tb group by s having sum(i) > 1;{noformat} ->
should fail with "SemanticException No valid privileges"
3. test where clause:
{noformat}select s from test_tb where s = 'Test' {noformat} -> should pass;
{noformat}select s from test_tb where i = 1 {noformat} -> should fail with
"SemanticException No valid privileges"
> add column level test cases for select ... group by, order by and where
> -----------------------------------------------------------------------
>
> Key: SENTRY-950
> URL: https://issues.apache.org/jira/browse/SENTRY-950
> Project: Sentry
> Issue Type: Task
> Reporter: Anne Yu
> Assignee: Anne Yu
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)