You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kh...@apache.org on 2014/05/09 01:20:02 UTC

svn commit: r1593451 - in /hive/branches/branch-0.13/ql/src/test: queries/clientpositive/authorization_parts.q results/clientpositive/authorization_parts.q.out

Author: khorgath
Date: Thu May  8 23:20:02 2014
New Revision: 1593451

URL: http://svn.apache.org/r1593451
Log:
HIVE-6919 : hive sql std auth select query fails on partitioned tables (Thejas Nair via Ashutosh Chauhan)
(continued, 2 more files)

Added:
    hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_parts.q
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_parts.q.out

Added: hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_parts.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_parts.q?rev=1593451&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_parts.q (added)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_parts.q Thu May  8 23:20:02 2014
@@ -0,0 +1,19 @@
+set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest;
+set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
+set hive.security.authorization.enabled=true;
+
+dfs ${system:test.dfs.mkdir} ${system:test.tmp.dir}/a_uri_add_part1;
+dfs ${system:test.dfs.mkdir} ${system:test.tmp.dir}/a_uri_add_part2;
+
+
+
+
+-- check add partition without insert privilege
+create table tpart(i int, j int) partitioned by (k string);
+
+alter table tpart add partition (k = '1') location '${system:test.tmp.dir}/a_uri_add_part1/';
+alter table tpart add partition (k = '2') location '${system:test.tmp.dir}/a_uri_add_part2/';
+
+select count(*) from tpart;
+
+analyze table tpart partition (k) compute statistics;

Added: hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_parts.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_parts.q.out?rev=1593451&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_parts.q.out (added)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_parts.q.out Thu May  8 23:20:02 2014
@@ -0,0 +1,56 @@
+PREHOOK: query: -- check add partition without insert privilege
+create table tpart(i int, j int) partitioned by (k string)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+POSTHOOK: query: -- check add partition without insert privilege
+create table tpart(i int, j int) partitioned by (k string)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@tpart
+#### A masked pattern was here ####
+PREHOOK: type: ALTERTABLE_ADDPARTS
+#### A masked pattern was here ####
+PREHOOK: Output: default@tpart
+#### A masked pattern was here ####
+POSTHOOK: type: ALTERTABLE_ADDPARTS
+#### A masked pattern was here ####
+POSTHOOK: Output: default@tpart
+POSTHOOK: Output: default@tpart@k=1
+#### A masked pattern was here ####
+PREHOOK: type: ALTERTABLE_ADDPARTS
+#### A masked pattern was here ####
+PREHOOK: Output: default@tpart
+#### A masked pattern was here ####
+POSTHOOK: type: ALTERTABLE_ADDPARTS
+#### A masked pattern was here ####
+POSTHOOK: Output: default@tpart
+POSTHOOK: Output: default@tpart@k=2
+PREHOOK: query: select count(*) from tpart
+PREHOOK: type: QUERY
+PREHOOK: Input: default@tpart
+PREHOOK: Input: default@tpart@k=1
+PREHOOK: Input: default@tpart@k=2
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*) from tpart
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tpart
+POSTHOOK: Input: default@tpart@k=1
+POSTHOOK: Input: default@tpart@k=2
+#### A masked pattern was here ####
+0
+PREHOOK: query: analyze table tpart partition (k) compute statistics
+PREHOOK: type: QUERY
+PREHOOK: Input: default@tpart
+PREHOOK: Input: default@tpart@k=1
+PREHOOK: Input: default@tpart@k=2
+PREHOOK: Output: default@tpart
+PREHOOK: Output: default@tpart@k=1
+PREHOOK: Output: default@tpart@k=2
+POSTHOOK: query: analyze table tpart partition (k) compute statistics
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tpart
+POSTHOOK: Input: default@tpart@k=1
+POSTHOOK: Input: default@tpart@k=2
+POSTHOOK: Output: default@tpart
+POSTHOOK: Output: default@tpart@k=1
+POSTHOOK: Output: default@tpart@k=2