PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientnegative/authorization_part.q

#
text | 33 lines | 23 code | 10 blank | 0 comment | 0 complexity | e501eb0c242e4066fac4ec927f2f3ff1 MD5 | raw file
 1create table authorization_part_fail (key int, value string) partitioned by (ds string);
 2ALTER TABLE authorization_part_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE");
 3set hive.security.authorization.enabled=true;
 4
 5grant Create on table authorization_part_fail to user hive_test_user;
 6grant Update on table authorization_part_fail to user hive_test_user;
 7grant Drop on table authorization_part_fail to user hive_test_user;
 8grant select on table src to user hive_test_user;
 9
10-- column grant to group
11
12grant select(key) on table authorization_part_fail to group hive_test_group1;
13grant select on table authorization_part_fail to group hive_test_group1;
14
15show grant group hive_test_group1 on table authorization_part_fail;
16
17insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src; 
18show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010');
19show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010');
20select key, value from authorization_part_fail where ds='2010' order by key limit 20;
21
22insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src; 
23show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011');
24show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011');
25select key, value from authorization_part_fail where ds='2011' order by key limit 20;
26
27select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20;
28
29revoke select on table authorization_part_fail partition (ds='2010') from group hive_test_group1;
30
31select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20;
32
33drop table authorization_part_fail;