hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject svn commit: r1577425 [1/2] - in /hive/branches/branch-0.13: contrib/src/test/results/clientnegative/ contrib/src/test/results/clientpositive/ ql/src/java/org/apache/hadoop/hive/ql/parse/ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plug...
Date Fri, 14 Mar 2014 04:50:00 GMT
Author: thejas
Date: Fri Mar 14 04:49:58 2014
New Revision: 1577425

URL: http://svn.apache.org/r1577425
Log:
HIVE-6434 : Restrict function create/drop to admin roles (Jason Dere via Thejas Nair)

Added:
    hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func1.q
    hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func2.q
    hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_macro1.q
    hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_func1.q
    hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_macro1.q
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func1.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func2.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_macro1.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_func1.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_macro1.q.out
Modified:
    hive/branches/branch-0.13/contrib/src/test/results/clientnegative/case_with_row_sequence.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientnegative/invalid_row_sequence.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientnegative/udtf_explode2.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/dboutput.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/lateral_view_explode2.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_avg.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_group_concat.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max_n.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min_n.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_add.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_arraymapstruct.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_format.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_row_sequence.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_explode2.q.out
    hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_output_on_close.q.out
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonudf_class.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_udaf_failure.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/drop_native_udf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_local_resource.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/autogen_colalias.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/compile_processor.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_func1.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudaf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_udaf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_view.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/drop_udf.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/macro.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/ptf_register_tblfn.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udaf_sum_list.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_compare_java_string.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_context_aware.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_logic_java_boolean.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength2.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_using.q.out
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/windowing_udaf2.q.out

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientnegative/case_with_row_sequence.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientnegative/case_with_row_sequence.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientnegative/case_with_row_sequence.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientnegative/case_with_row_sequence.q.out Fri Mar 14 04:49:58 2014
@@ -5,9 +5,11 @@ POSTHOOK: type: DROPFUNCTION
 PREHOOK: query: create temporary function row_sequence as 
 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: create temporary function row_sequence as 
 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: -- make sure a stateful function inside of CASE throws an exception
 -- since the short-circuiting requirements are contradictory
 SELECT CASE WHEN 3 > 2 THEN 10 WHEN row_sequence() > 5 THEN 20 ELSE 30 END

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientnegative/invalid_row_sequence.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientnegative/invalid_row_sequence.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientnegative/invalid_row_sequence.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientnegative/invalid_row_sequence.q.out Fri Mar 14 04:49:58 2014
@@ -2,14 +2,18 @@ PREHOOK: query: -- Verify that a statefu
 
 drop temporary function row_sequence
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- Verify that a stateful UDF cannot be used outside of the SELECT list
 
 drop temporary function row_sequence
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: create temporary function row_sequence as 
 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: create temporary function row_sequence as 
 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 FAILED: SemanticException [Error 10084]: Stateful UDF's can only be invoked in the SELECT list

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientnegative/udtf_explode2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientnegative/udtf_explode2.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientnegative/udtf_explode2.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientnegative/udtf_explode2.q.out Fri Mar 14 04:49:58 2014
@@ -1,5 +1,7 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION explode2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFExplode2'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION explode2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFExplode2'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 FAILED: SemanticException [Error 10083]: The number of aliases supplied in the AS clause does not match the number of columns output by the UDTF expected 2 aliases but got 1

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/dboutput.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/dboutput.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/dboutput.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/dboutput.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION dboutput AS 'org.apache.hadoop.hive.contrib.genericudf.example.GenericUDFDBOutput'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION dboutput AS 'org.apache.hadoop.hive.contrib.genericudf.example.GenericUDFDBOutput'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: DESCRIBE FUNCTION dboutput
 PREHOOK: type: DESCFUNCTION
 POSTHOOK: query: DESCRIBE FUNCTION dboutput
@@ -180,5 +182,7 @@ POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 PREHOOK: query: DROP TEMPORARY FUNCTION dboutput
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION dboutput
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/lateral_view_explode2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/lateral_view_explode2.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/lateral_view_explode2.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/lateral_view_explode2.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION explode2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFExplode2'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION explode2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFExplode2'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT col1, col2 FROM src LATERAL VIEW explode2(array(1,2,3)) myTable AS col1, col2 LIMIT 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -15,5 +17,7 @@ POSTHOOK: Input: default@src
 3	3
 PREHOOK: query: DROP TEMPORARY FUNCTION explode2
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION explode2
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_avg.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_avg.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_avg.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_avg.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_avg AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleAvg'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_avg AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleAvg'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT example_avg(substr(value,5)),
        example_avg(IF(substr(value,5) > 250, NULL, substr(value,5)))
@@ -73,5 +75,7 @@ POSTHOOK: Input: default@src
 260.182	134.82926829268294
 PREHOOK: query: DROP TEMPORARY FUNCTION example_avg
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_avg
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_group_concat.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_group_concat.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_group_concat.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_group_concat.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_group_concat AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleGroupConcat'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_group_concat AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleGroupConcat'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT substr(value,5,1), example_group_concat("(", key, ":", value, ")")
 FROM src
@@ -86,5 +88,7 @@ POSTHOOK: Input: default@src
 9	(90:val_90)(90:val_90)(90:val_90)(92:val_92)(95:val_95)(95:val_95)(96:val_96)(97:val_97)(97:val_97)(98:val_98)(98:val_98)(9:val_9)
 PREHOOK: query: DROP TEMPORARY FUNCTION example_group_concat
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_group_concat
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_max AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMax'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_max AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMax'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: DESCRIBE FUNCTION EXTENDED example_max
 PREHOOK: type: DESCFUNCTION
 POSTHOOK: query: DESCRIBE FUNCTION EXTENDED example_max
@@ -78,5 +80,7 @@ POSTHOOK: Input: default@src
 98	98
 PREHOOK: query: DROP TEMPORARY FUNCTION example_max
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_max
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max_n.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max_n.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max_n.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_max_n.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_max_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMaxN'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_max_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMaxN'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT example_max_n(substr(value,5),10),
        example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10)
@@ -73,5 +75,7 @@ POSTHOOK: Input: default@src
 [498.0,498.0,498.0,497.0,496.0,495.0,494.0,493.0,492.0,492.0]	[249.0,248.0,247.0,244.0,242.0,242.0,241.0,239.0,239.0,238.0]
 PREHOOK: query: DROP TEMPORARY FUNCTION example_max_n
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_max_n
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_min AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMin'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_min AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMin'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: DESCRIBE FUNCTION EXTENDED example_min
 PREHOOK: type: DESCFUNCTION
 POSTHOOK: query: DESCRIBE FUNCTION EXTENDED example_min
@@ -78,5 +80,7 @@ POSTHOOK: Input: default@src
 0	0
 PREHOOK: query: DROP TEMPORARY FUNCTION example_min
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_min
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min_n.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min_n.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min_n.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udaf_example_min_n.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_min_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMinN'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_min_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMinN'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT example_min_n(substr(value,5),10),
        example_min_n(IF(substr(value,5) < 250, NULL, substr(value,5)),10)
@@ -73,5 +75,7 @@ POSTHOOK: Input: default@src
 [0.0,0.0,0.0,2.0,4.0,5.0,5.0,5.0,8.0,9.0]	[252.0,255.0,255.0,256.0,256.0,257.0,258.0,260.0,262.0,263.0]
 PREHOOK: query: DROP TEMPORARY FUNCTION example_min_n
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_min_n
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_add.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_add.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_add.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_add.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_add AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleAdd'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_add AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleAdd'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT example_add(1, 2),
        example_add(1, 2, 3),
@@ -77,5 +79,7 @@ POSTHOOK: Input: default@src
 3	6	10	3.3000000000000003	6.6	11.0	10.4
 PREHOOK: query: DROP TEMPORARY FUNCTION example_add
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_add
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_arraymapstruct.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_arraymapstruct.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_arraymapstruct.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_arraymapstruct.q.out Fri Mar 14 04:49:58 2014
@@ -1,15 +1,21 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_arraysum    AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleArraySum'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_arraysum    AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleArraySum'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_mapconcat   AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleMapConcat'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_mapconcat   AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleMapConcat'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_structprint AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleStructPrint'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_structprint AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleStructPrint'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT example_arraysum(lint), example_mapconcat(mstringstring), example_structprint(lintstring[0])
 FROM src_thrift
@@ -68,13 +74,19 @@ POSTHOOK: Input: default@src_thrift
 NULL	NULL	NULL
 PREHOOK: query: DROP TEMPORARY FUNCTION example_arraysum
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_arraysum
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: DROP TEMPORARY FUNCTION example_mapconcat
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_mapconcat
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: DROP TEMPORARY FUNCTION example_structprint
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_structprint
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_format.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_format.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_format.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_example_format.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION example_format AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleFormat'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION example_format AS 'org.apache.hadoop.hive.contrib.udf.example.UDFExampleFormat'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT example_format("abc"),
        example_format("%1$s", 1.1),
@@ -65,5 +67,7 @@ POSTHOOK: Input: default@src
 abc	1.1	1.1 1.200000e+00	a 12 10
 PREHOOK: query: DROP TEMPORARY FUNCTION example_format
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION example_format
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_row_sequence.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_row_sequence.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_row_sequence.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udf_row_sequence.q.out Fri Mar 14 04:49:58 2014
@@ -13,9 +13,11 @@ POSTHOOK: type: DROPFUNCTION
 PREHOOK: query: create temporary function row_sequence as 
 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: create temporary function row_sequence as 
 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: DESCRIBE FUNCTION EXTENDED row_sequence
 PREHOOK: type: DESCFUNCTION
 POSTHOOK: query: DESCRIBE FUNCTION EXTENDED row_sequence
@@ -640,5 +642,7 @@ POSTHOOK: Input: default@src
 119	false
 PREHOOK: query: drop temporary function row_sequence
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: drop temporary function row_sequence
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_explode2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_explode2.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_explode2.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_explode2.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION explode2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFExplode2'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION explode2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFExplode2'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT explode2(array(1,2,3)) AS (col1, col2) FROM src LIMIT 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -15,5 +17,7 @@ POSTHOOK: Input: default@src
 3	3
 PREHOOK: query: DROP TEMPORARY FUNCTION explode2
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION explode2
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_output_on_close.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_output_on_close.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_output_on_close.q.out (original)
+++ hive/branches/branch-0.13/contrib/src/test/results/clientpositive/udtf_output_on_close.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION udtfCount2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFCount2'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION udtfCount2 AS 'org.apache.hadoop.hive.contrib.udtf.example.GenericUDTFCount2'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT udtfCount2(key) AS count FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java (original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java Fri Mar 14 04:49:58 2014
@@ -24,6 +24,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+import org.apache.hadoop.hive.metastore.MetaStoreUtils;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.ResourceType;
 import org.apache.hadoop.hive.metastore.api.ResourceUri;
@@ -31,6 +32,7 @@ import org.apache.hadoop.hive.ql.ErrorMs
 import org.apache.hadoop.hive.ql.exec.FunctionRegistry;
 import org.apache.hadoop.hive.ql.exec.FunctionUtils;
 import org.apache.hadoop.hive.ql.exec.TaskFactory;
+import org.apache.hadoop.hive.ql.hooks.WriteEntity;
 import org.apache.hadoop.hive.ql.metadata.Hive;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.plan.CreateFunctionDesc;
@@ -80,6 +82,8 @@ public class FunctionSemanticAnalyzer ex
     CreateFunctionDesc desc =
         new CreateFunctionDesc(functionName, isTemporaryFunction, className, resources);
     rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf));
+
+    addEntities(functionName, isTemporaryFunction);
   }
 
   private void analyzeDropFunction(ASTNode ast) throws SemanticException {
@@ -103,6 +107,8 @@ public class FunctionSemanticAnalyzer ex
     boolean isTemporaryFunction = (ast.getFirstChildWithType(HiveParser.TOK_TEMPORARY) != null);
     DropFunctionDesc desc = new DropFunctionDesc(functionName, isTemporaryFunction);
     rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf));
+
+    addEntities(functionName, isTemporaryFunction);
   }
 
   private ResourceType getResourceType(ASTNode token) throws SemanticException {
@@ -144,4 +150,28 @@ public class FunctionSemanticAnalyzer ex
 
     return resources;
   }
+
+  /**
+   * Add write entities to the semantic analyzer to restrict function creation to priviliged users.
+   */
+  private void addEntities(String functionName, boolean isTemporaryFunction)
+      throws SemanticException {
+    Database database = null;
+    if (isTemporaryFunction) {
+      // This means temp function creation is also restricted.
+      database = getDatabase(MetaStoreUtils.DEFAULT_DATABASE_NAME);
+    } else {
+      try {
+        String[] qualifiedNameParts = FunctionUtils.getQualifiedFunctionNameParts(functionName);
+        String dbName = qualifiedNameParts[0];
+        database = getDatabase(dbName);
+      } catch (HiveException e) {
+        LOG.error(e);
+        throw new SemanticException(e);
+      }
+    }
+    if (database != null) {
+      outputs.add(new WriteEntity(database, WriteEntity.WriteType.DDL_METADATA_ONLY));
+    }
+  }
 }

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java (original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java Fri Mar 14 04:49:58 2014
@@ -31,6 +31,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+import org.apache.hadoop.hive.metastore.MetaStoreUtils;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.ql.ErrorMsg;
@@ -38,6 +39,7 @@ import org.apache.hadoop.hive.ql.exec.Co
 import org.apache.hadoop.hive.ql.exec.FunctionRegistry;
 import org.apache.hadoop.hive.ql.exec.FunctionUtils;
 import org.apache.hadoop.hive.ql.exec.TaskFactory;
+import org.apache.hadoop.hive.ql.hooks.WriteEntity;
 import org.apache.hadoop.hive.ql.lib.Dispatcher;
 import org.apache.hadoop.hive.ql.lib.Node;
 import org.apache.hadoop.hive.ql.lib.PreOrderWalker;
@@ -138,6 +140,8 @@ public class MacroSemanticAnalyzer exten
     }
     CreateMacroDesc desc = new CreateMacroDesc(functionName, macroColNames, macroColTypes, body);
     rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf));
+
+    addEntities();
   }
 
   @SuppressWarnings("unchecked")
@@ -160,5 +164,13 @@ public class MacroSemanticAnalyzer exten
 
     DropMacroDesc desc = new DropMacroDesc(functionName);
     rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf));
+
+    addEntities();
+  }
+
+  private void addEntities() throws SemanticException {
+    Database database = getDatabase(MetaStoreUtils.DEFAULT_DATABASE_NAME);
+    // This restricts macro creation to privileged users.
+    outputs.add(new WriteEntity(database, WriteEntity.WriteType.DDL_METADATA_ONLY));
   }
 }

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java (original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java Fri Mar 14 04:49:58 2014
@@ -169,10 +169,10 @@ public class Operation2Privilege {
     op2Priv.put(HiveOperationType.SHOWINDEXES, new InOutPrivs(null, null));
     op2Priv.put(HiveOperationType.SHOWPARTITIONS, new InOutPrivs(null, null));
     op2Priv.put(HiveOperationType.SHOWLOCKS, new InOutPrivs(null, null));
-    op2Priv.put(HiveOperationType.CREATEFUNCTION, new InOutPrivs(null, null));
-    op2Priv.put(HiveOperationType.DROPFUNCTION, new InOutPrivs(null, null));
-    op2Priv.put(HiveOperationType.CREATEMACRO, new InOutPrivs(null, null));
-    op2Priv.put(HiveOperationType.DROPMACRO, new InOutPrivs(null, null));
+    op2Priv.put(HiveOperationType.CREATEFUNCTION, new InOutPrivs(null, ADMIN_PRIV_AR));
+    op2Priv.put(HiveOperationType.DROPFUNCTION, new InOutPrivs(null, ADMIN_PRIV_AR));
+    op2Priv.put(HiveOperationType.CREATEMACRO, new InOutPrivs(null, ADMIN_PRIV_AR));
+    op2Priv.put(HiveOperationType.DROPMACRO, new InOutPrivs(null, ADMIN_PRIV_AR));
 
     op2Priv.put(HiveOperationType.LOCKTABLE, new InOutPrivs(null, null));
     op2Priv.put(HiveOperationType.UNLOCKTABLE, new InOutPrivs(null, null));

Added: hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func1.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func1.q?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func1.q (added)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func1.q Fri Mar 14 04:49:58 2014
@@ -0,0 +1,7 @@
+set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory;
+set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
+set hive.security.authorization.enabled=true;
+set user.name=hive_test_user;
+
+-- permanent function creation should fail for non-admin roles
+create function perm_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii';

Added: hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func2.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func2.q?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func2.q (added)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_func2.q Fri Mar 14 04:49:58 2014
@@ -0,0 +1,8 @@
+set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory;
+set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
+set hive.security.authorization.enabled=true;
+set user.name=hive_test_user;
+
+-- temp function creation should fail for non-admin roles
+create temporary function temp_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii';
+

Added: hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_macro1.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_macro1.q?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_macro1.q (added)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_create_macro1.q Fri Mar 14 04:49:58 2014
@@ -0,0 +1,8 @@
+set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory;
+set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
+set hive.security.authorization.enabled=true;
+set user.name=hive_test_user;
+
+-- temp macro creation should fail for non-admin roles
+create temporary macro mymacro1(x double) x * x;
+

Added: hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_func1.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_func1.q?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_func1.q (added)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_func1.q Fri Mar 14 04:49:58 2014
@@ -0,0 +1,14 @@
+set hive.users.in.admin.role=hive_admin_user;
+set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory;
+set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
+set hive.security.authorization.enabled=true;
+set user.name=hive_admin_user;
+
+-- admin required for create function
+set role ADMIN;
+
+create temporary function temp_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii';
+create function perm_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii';
+
+drop temporary function temp_fn;
+drop function perm_fn;

Added: hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_macro1.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_macro1.q?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_macro1.q (added)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_create_macro1.q Fri Mar 14 04:49:58 2014
@@ -0,0 +1,12 @@
+set hive.users.in.admin.role=hive_admin_user;
+set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory;
+set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator;
+set hive.security.authorization.enabled=true;
+set user.name=hive_admin_user;
+
+-- admin required for create macro
+set role ADMIN;
+
+create temporary macro mymacro1(x double) x * x;
+
+drop temporary macro mymacro1;

Added: hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func1.q.out?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func1.q.out (added)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func1.q.out Fri Mar 14 04:49:58 2014
@@ -0,0 +1 @@
+FAILED: HiveAccessControlException Permission denied. Principal [name=hive_test_user, type=USER] does not have following privileges on Object [type=DATABASE, name=default] : [ADMIN PRIVILEGE]

Added: hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func2.q.out?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func2.q.out (added)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_func2.q.out Fri Mar 14 04:49:58 2014
@@ -0,0 +1 @@
+FAILED: HiveAccessControlException Permission denied. Principal [name=hive_test_user, type=USER] does not have following privileges on Object [type=DATABASE, name=default] : [ADMIN PRIVILEGE]

Added: hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_macro1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_macro1.q.out?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_macro1.q.out (added)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_create_macro1.q.out Fri Mar 14 04:49:58 2014
@@ -0,0 +1 @@
+FAILED: HiveAccessControlException Permission denied. Principal [name=hive_test_user, type=USER] does not have following privileges on Object [type=DATABASE, name=default] : [ADMIN PRIVILEGE]

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out Fri Mar 14 04:49:58 2014
@@ -2,10 +2,12 @@ PREHOOK: query: -- TaskLog retrieval upo
 
 CREATE TEMPORARY FUNCTION evaluate_npe AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFEvaluateNPE'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- TaskLog retrieval upon Null Pointer Exception in Cluster
 
 CREATE TEMPORARY FUNCTION evaluate_npe AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFEvaluateNPE'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: FROM src
 SELECT evaluate_npe(src.key) LIMIT 1
 PREHOOK: type: QUERY

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out Fri Mar 14 04:49:58 2014
@@ -1,4 +1,5 @@
 PREHOOK: query: create function default.badfunc as 'my.nonexistent.class'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 FAILED: Class my.nonexistent.class not found
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out Fri Mar 14 04:49:58 2014
@@ -1,3 +1 @@
-PREHOOK: query: create function nonexistentdb.badfunc as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'
-PREHOOK: type: CREATEFUNCTION
-FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask. NoSuchObjectException(message:There is no database named nonexistentdb)
+FAILED: SemanticException org.apache.hadoop.hive.ql.parse.SemanticException: Database does not exist: nonexistentdb

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonudf_class.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonudf_class.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonudf_class.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_function_nonudf_class.q.out Fri Mar 14 04:49:58 2014
@@ -1,4 +1,5 @@
 PREHOOK: query: create function default.badfunc as 'java.lang.String'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 FAILED: Class java.lang.String does not implement UDF, GenericUDF, or UDAF
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_udaf_failure.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_udaf_failure.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_udaf_failure.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_udaf_failure.q.out Fri Mar 14 04:49:58 2014
@@ -1,5 +1,7 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_udaf AS 'org.apache.hadoop.hive.ql.udf.UDAFWrongArgLengthForTestCase'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_udaf AS 'org.apache.hadoop.hive.ql.udf.UDAFWrongArgLengthForTestCase'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 FAILED: SemanticException org.apache.hadoop.hive.ql.exec.UDFArgumentLengthException: public boolean org.apache.hadoop.hive.ql.udf.UDAFWrongArgLengthForTestCase$UDAFWrongArgLengthForTestCaseEvaluator.merge() requires 0 arguments but 1 are passed in.

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_genericudf.q.out Fri Mar 14 04:49:58 2014
@@ -1,4 +1,5 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION dummy_genericudf AS 'org.apache.hadoop.hive.ql.udf.generic.DummyGenericUDF'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 FAILED: Class org.apache.hadoop.hive.ql.udf.generic.DummyGenericUDF not found
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/create_unknown_udf_udaf.q.out Fri Mar 14 04:49:58 2014
@@ -1,4 +1,5 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION dummy_function AS 'org.apache.hadoop.hive.ql.udf.DummyFunction'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 FAILED: Class org.apache.hadoop.hive.ql.udf.DummyFunction not found
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/drop_native_udf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/drop_native_udf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/drop_native_udf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/drop_native_udf.q.out Fri Mar 14 04:49:58 2014
@@ -1,3 +1,4 @@
 PREHOOK: query: DROP TEMPORARY FUNCTION max
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_function_does_not_implement_udf.q.out Fri Mar 14 04:49:58 2014
@@ -1,4 +1,5 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION moo AS 'org.apache.hadoop.hive.ql.Driver'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 FAILED: Class org.apache.hadoop.hive.ql.Driver does not implement UDF, GenericUDF, or UDAF
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_local_resource.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_local_resource.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_local_resource.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_local_resource.q.out Fri Mar 14 04:49:58 2014
@@ -1,3 +1,4 @@
 PREHOOK: query: create function lookup as 'org.apache.hadoop.hive.ql.udf.UDFFileLookup' using file '../../data/files/sales.txt'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask. Hive warehouse is non-local, but ../../data/files/sales.txt specifies file on local filesystem. Resources on non-local warehouse should specify a non-local scheme/path

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out Fri Mar 14 04:49:58 2014
@@ -1,4 +1,5 @@
 PREHOOK: query: create function lookup as 'org.apache.hadoop.hive.ql.udf.UDFFileLookup' using file 'nonexistent_file.txt'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 nonexistent_file.txt does not exist
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask. Unable to load FILE nonexistent_file.txt

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_error AS 'org.apache.hadoop.hive.ql.udf.UDFTestErrorOnFalse'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_error AS 'org.apache.hadoop.hive.ql.udf.UDFTestErrorOnFalse'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT test_error(key < 125 OR key > 130) FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Modified: hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_error AS 'org.apache.hadoop.hive.ql.udf.UDFTestErrorOnFalse'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_error AS 'org.apache.hadoop.hive.ql.udf.UDFTestErrorOnFalse'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT test_error(key < 125 OR key > 130)
 FROM (
   SELECT *

Added: hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_func1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_func1.q.out?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_func1.q.out (added)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_func1.q.out Fri Mar 14 04:49:58 2014
@@ -0,0 +1,30 @@
+PREHOOK: query: -- admin required for create function
+set role ADMIN
+PREHOOK: type: SHOW_ROLES
+POSTHOOK: query: -- admin required for create function
+set role ADMIN
+POSTHOOK: type: SHOW_ROLES
+PREHOOK: query: create temporary function temp_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii'
+PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
+POSTHOOK: query: create temporary function temp_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii'
+POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
+PREHOOK: query: create function perm_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii'
+PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
+POSTHOOK: query: create function perm_fn as 'org.apache.hadoop.hive.ql.udf.UDFAscii'
+POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
+PREHOOK: query: drop temporary function temp_fn
+PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
+POSTHOOK: query: drop temporary function temp_fn
+POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
+PREHOOK: query: drop function perm_fn
+PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
+POSTHOOK: query: drop function perm_fn
+POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Added: hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_macro1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_macro1.q.out?rev=1577425&view=auto
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_macro1.q.out (added)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_create_macro1.q.out Fri Mar 14 04:49:58 2014
@@ -0,0 +1,18 @@
+PREHOOK: query: -- admin required for create macro
+set role ADMIN
+PREHOOK: type: SHOW_ROLES
+POSTHOOK: query: -- admin required for create macro
+set role ADMIN
+POSTHOOK: type: SHOW_ROLES
+PREHOOK: query: create temporary macro mymacro1(x double) x * x
+PREHOOK: type: CREATEMACRO
+PREHOOK: Output: database:default
+POSTHOOK: query: create temporary macro mymacro1(x double) x * x
+POSTHOOK: type: CREATEMACRO
+POSTHOOK: Output: database:default
+PREHOOK: query: drop temporary macro mymacro1
+PREHOOK: type: DROPMACRO
+PREHOOK: Output: database:default
+POSTHOOK: query: drop temporary macro mymacro1
+POSTHOOK: type: DROPMACRO
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/autogen_colalias.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/autogen_colalias.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/autogen_colalias.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/autogen_colalias.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_max AS 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_max AS 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: create table dest_grouped_old1 as select 1+1, 2+2 as zz, src.key, test_max(length(src.value)), count(src.value), sin(count(src.value)), count(sin(src.value)), unix_timestamp(), CAST(SUM(IF(value > 10, value, 1)) AS INT), if(src.key > 1,
 1,
 0)
@@ -83,6 +85,8 @@ key                 	string             
 PREHOOK: query: -- Drop the temporary function at the end till HIVE-3160 gets fixed
 DROP TEMPORARY FUNCTION test_max
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- Drop the temporary function at the end till HIVE-3160 gets fixed
 DROP TEMPORARY FUNCTION test_max
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/compile_processor.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/compile_processor.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/compile_processor.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/compile_processor.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION Pyth as 'Pyth'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION Pyth as 'Pyth'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT Pyth(3,4) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_func1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_func1.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_func1.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_func1.q.out Fri Mar 14 04:49:58 2014
@@ -15,8 +15,10 @@ POSTHOOK: query: create database mydb
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: create function mydb.func1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:mydb
 POSTHOOK: query: create function mydb.func1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:mydb
 PREHOOK: query: show functions mydb.func1
 PREHOOK: type: SHOWFUNCTIONS
 POSTHOOK: query: show functions mydb.func1
@@ -33,8 +35,10 @@ POSTHOOK: Input: default@src
 ABC
 PREHOOK: query: drop function mydb.func1
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:mydb
 POSTHOOK: query: drop function mydb.func1
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:mydb
 PREHOOK: query: -- function should now be gone
 show functions mydb.func1
 PREHOOK: type: SHOWFUNCTIONS
@@ -44,9 +48,11 @@ POSTHOOK: type: SHOWFUNCTIONS
 PREHOOK: query: -- To test function name resolution
 create function mydb.qtest_get_java_boolean as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:mydb
 POSTHOOK: query: -- To test function name resolution
 create function mydb.qtest_get_java_boolean as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:mydb
 PREHOOK: query: use default
 PREHOOK: type: SWITCHDATABASE
 POSTHOOK: query: use default
@@ -79,8 +85,10 @@ POSTHOOK: Input: default@src
 ABC	NULL	ABC
 PREHOOK: query: drop function mydb.qtest_get_java_boolean
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:mydb
 POSTHOOK: query: drop function mydb.qtest_get_java_boolean
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:mydb
 PREHOOK: query: drop database mydb cascade
 PREHOOK: type: DROPDATABASE
 PREHOOK: Input: database:mydb

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudaf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudaf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudaf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudaf.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_avg AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_avg AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 SELECT
     test_avg(1),
@@ -89,5 +91,7 @@ POSTHOOK: Input: default@src
 1.0	260.182
 PREHOOK: query: DROP TEMPORARY FUNCTIOn test_avg
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTIOn test_avg
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_genericudf.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_translate AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_translate AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TABLE dest1(c1 STRING, c2 STRING, c3 STRING, c4 STRING, c5 STRING, c6 STRING, c7 STRING)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
@@ -72,8 +74,10 @@ POSTHOOK: Lineage: dest1.c7 EXPRESSION [
 bbc	bcc	NULL	NULL	NULL	bc	abc
 PREHOOK: query: DROP TEMPORARY FUNCTION test_translate
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_translate
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: dest1.c1 EXPRESSION []
 POSTHOOK: Lineage: dest1.c2 EXPRESSION []
 POSTHOOK: Lineage: dest1.c3 EXPRESSION []

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_udaf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_udaf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_udaf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_udaf.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_max AS 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_max AS 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TABLE dest1(col INT)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
@@ -94,6 +96,8 @@ POSTHOOK: Lineage: dest1.col EXPRESSION 
 98
 PREHOOK: query: DROP TEMPORARY FUNCTION test_max
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_max
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: dest1.col EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_view.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_view.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_view.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/create_view.q.out Fri Mar 14 04:49:58 2014
@@ -671,10 +671,12 @@ PREHOOK: query: -- test usage of a funct
 CREATE TEMPORARY FUNCTION test_translate AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- test usage of a function within a view
 CREATE TEMPORARY FUNCTION test_translate AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW view8(c) AS
 SELECT test_translate('abc', 'a', 'b')
@@ -746,10 +748,12 @@ PREHOOK: query: -- test usage of a UDAF 
 CREATE TEMPORARY FUNCTION test_max AS
 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- test usage of a UDAF within a view
 CREATE TEMPORARY FUNCTION test_max AS
 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: -- disable map-side aggregation
 CREATE VIEW view9(m) AS
@@ -964,10 +968,12 @@ PREHOOK: query: -- test usage of a UDTF 
 CREATE TEMPORARY FUNCTION test_explode AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDTFExplode'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- test usage of a UDTF within a view
 CREATE TEMPORARY FUNCTION test_explode AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDTFExplode'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW view11 AS
 SELECT test_explode(array(1,2,3)) AS (boom)
@@ -1707,16 +1713,22 @@ POSTHOOK: Output: default@view16
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DROP TEMPORARY FUNCTION test_translate
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_translate
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DROP TEMPORARY FUNCTION test_max
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_max
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DROP TEMPORARY FUNCTION test_explode
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_explode
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/drop_udf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/drop_udf.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/drop_udf.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/drop_udf.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_translate AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_translate AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: EXPLAIN
 DROP TEMPORARY FUNCTION test_translate
 PREHOOK: type: DROPFUNCTION
@@ -16,5 +18,7 @@ STAGE PLANS:
 
 PREHOOK: query: DROP TEMPORARY FUNCTION test_translate
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_translate
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/macro.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/macro.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/macro.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/macro.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x))
 PREHOOK: type: CREATEMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x))
 POSTHOOK: type: CREATEMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT SIGMOID(2) FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -82,12 +84,16 @@ STAGE PLANS:
 
 PREHOOK: query: DROP TEMPORARY MACRO SIGMOID
 PREHOOK: type: DROPMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY MACRO SIGMOID
 POSTHOOK: type: DROPMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TEMPORARY MACRO FIXED_NUMBER() 1
 PREHOOK: type: CREATEMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY MACRO FIXED_NUMBER() 1
 POSTHOOK: type: CREATEMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT FIXED_NUMBER() + 1 FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -169,12 +175,16 @@ STAGE PLANS:
 
 PREHOOK: query: DROP TEMPORARY MACRO FIXED_NUMBER
 PREHOOK: type: DROPMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY MACRO FIXED_NUMBER
 POSTHOOK: type: DROPMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TEMPORARY MACRO CONF_TEST() "1"
 PREHOOK: type: CREATEMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY MACRO CONF_TEST() "1"
 POSTHOOK: type: CREATEMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT CONF_TEST() FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -186,16 +196,22 @@ POSTHOOK: Input: default@src
 1
 PREHOOK: query: DROP TEMPORARY MACRO CONF_TEST
 PREHOOK: type: DROPMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY MACRO CONF_TEST
 POSTHOOK: type: DROPMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TEMPORARY MACRO SIMPLE_ADD (x INT, y INT) x + y
 PREHOOK: type: CREATEMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY MACRO SIMPLE_ADD (x INT, y INT) x + y
 POSTHOOK: type: CREATEMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: CREATE TEMPORARY MACRO SIMPLE_ADD (x INT, y INT) x + y
 PREHOOK: type: CREATEMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY MACRO SIMPLE_ADD (x INT, y INT) x + y
 POSTHOOK: type: CREATEMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT SIMPLE_ADD(1, 9) FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -277,9 +293,13 @@ STAGE PLANS:
 
 PREHOOK: query: DROP TEMPORARY MACRO SIMPLE_ADD
 PREHOOK: type: DROPMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY MACRO SIMPLE_ADD
 POSTHOOK: type: DROPMACRO
+POSTHOOK: Output: database:default
 PREHOOK: query: DROP TEMPORARY MACRO SIMPLE_ADD
 PREHOOK: type: DROPMACRO
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY MACRO SIMPLE_ADD
 POSTHOOK: type: DROPMACRO
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/ptf_register_tblfn.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/ptf_register_tblfn.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/ptf_register_tblfn.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/ptf_register_tblfn.q.out Fri Mar 14 04:49:58 2014
@@ -35,8 +35,10 @@ POSTHOOK: type: LOAD
 POSTHOOK: Output: default@flights_tiny
 PREHOOK: query: create temporary function matchpathtest as 'org.apache.hadoop.hive.ql.udf.ptf.MatchPath$MatchPathResolver'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: create temporary function matchpathtest as 'org.apache.hadoop.hive.ql.udf.ptf.MatchPath$MatchPathResolver'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: -- 1. basic Matchpath test
 select origin_city_name, fl_num, year, month, day_of_month, sz, tpath 
 from matchpathtest(on 
@@ -81,5 +83,7 @@ Chicago	897	2010	10	21	3	21
 Chicago	897	2010	10	22	2	22
 PREHOOK: query: drop temporary function matchpathtest
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: drop temporary function matchpathtest
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udaf_sum_list.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udaf_sum_list.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udaf_sum_list.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udaf_sum_list.q.out Fri Mar 14 04:49:58 2014
@@ -3,11 +3,13 @@ PREHOOK: query: -- HIVE-5279
 -- After
 create temporary function sum_list as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSumList'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: -- HIVE-5279
 -- GenericUDAFSumList has Converter which does not have default constructor
 -- After
 create temporary function sum_list as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSumList'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: select sum_list(array(key, key)) from src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_compare_java_string.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_compare_java_string.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_compare_java_string.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_compare_java_string.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_udf_get_java_string AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestGetJavaString'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_udf_get_java_string AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestGetJavaString'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: select * from src where value = test_udf_get_java_string("val_66")
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_context_aware.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_context_aware.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_context_aware.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_context_aware.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: create temporary function counter as 'org.apache.hadoop.hive.ql.udf.generic.DummyContextUDF'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: create temporary function counter as 'org.apache.hadoop.hive.ql.udf.generic.DummyContextUDF'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: select *, counter(key) from src limit 20
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_logic_java_boolean.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_logic_java_boolean.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_logic_java_boolean.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_logic_java_boolean.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION test_udf_get_java_boolean AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestGetJavaBoolean'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION test_udf_get_java_boolean AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestGetJavaBoolean'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: select 1 from src where test_udf_get_java_boolean("false") and True limit 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -169,5 +171,7 @@ POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 PREHOOK: query: DROP TEMPORARY FUNCTION test_udf_get_java_boolean
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION test_udf_get_java_boolean
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION testlength AS 'org.apache.hadoop.hive.ql.udf.UDFTestLength'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION testlength AS 'org.apache.hadoop.hive.ql.udf.UDFTestLength'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT testlength(src.value) FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -524,5 +526,7 @@ POSTHOOK: Input: default@src
 6
 PREHOOK: query: DROP TEMPORARY FUNCTION testlength
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION testlength
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength2.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength2.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_testlength2.q.out Fri Mar 14 04:49:58 2014
@@ -12,8 +12,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE TEMPORARY FUNCTION testlength2 AS 'org.apache.hadoop.hive.ql.udf.UDFTestLength2'
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: CREATE TEMPORARY FUNCTION testlength2 AS 'org.apache.hadoop.hive.ql.udf.UDFTestLength2'
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: SELECT testlength2(src.value) FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -524,5 +526,7 @@ POSTHOOK: Input: default@src
 6
 PREHOOK: query: DROP TEMPORARY FUNCTION testlength2
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: DROP TEMPORARY FUNCTION testlength2
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_using.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_using.q.out?rev=1577425&r1=1577424&r2=1577425&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_using.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/udf_using.q.out Fri Mar 14 04:49:58 2014
@@ -1,7 +1,9 @@
 #### A masked pattern was here ####
 PREHOOK: type: CREATEFUNCTION
+PREHOOK: Output: database:default
 #### A masked pattern was here ####
 POSTHOOK: type: CREATEFUNCTION
+POSTHOOK: Output: database:default
 PREHOOK: query: create table udf_using (c1 string)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
@@ -40,7 +42,9 @@ POSTHOOK: Output: default@udf_using
 POSTHOOK: Lineage: udf_using.c1 SIMPLE []
 PREHOOK: query: drop function lookup
 PREHOOK: type: DROPFUNCTION
+PREHOOK: Output: database:default
 POSTHOOK: query: drop function lookup
 POSTHOOK: type: DROPFUNCTION
+POSTHOOK: Output: database:default
 POSTHOOK: Lineage: udf_using.c1 SIMPLE []
 #### A masked pattern was here ####



Mime
View raw message