hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1537540 [9/10] - in /hive/trunk: ./ ql/src/java/org/apache/hadoop/hive/ql/parse/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/
Date Thu, 31 Oct 2013 16:00:41 GMT
Modified: hive/trunk/ql/src/test/results/clientpositive/udf_rpad.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_rpad.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_rpad.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_rpad.q.out Thu Oct 31 16:00:36 2013
@@ -17,56 +17,45 @@ PREHOOK: query: EXPLAIN SELECT
   rpad('hi', 1, '?'),
   rpad('hi', 5, '.'),
   rpad('hi', 6, '123')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT
   rpad('hi', 1, '?'),
   rpad('hi', 5, '.'),
   rpad('hi', 6, '123')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION rpad 'hi' 1 '?')) (TOK_SELEXPR (TOK_FUNCTION rpad 'hi' 5 '.')) (TOK_SELEXPR (TOK_FUNCTION rpad 'hi' 6 '123'))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION rpad 'hi' 1 '?')) (TOK_SELEXPR (TOK_FUNCTION rpad 'hi' 5 '.')) (TOK_SELEXPR (TOK_FUNCTION rpad 'hi' 6 '123')))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: rpad('hi', 1, '?')
-                    type: string
-                    expr: rpad('hi', 5, '.')
-                    type: string
-                    expr: rpad('hi', 6, '123')
-                    type: string
-              outputColumnNames: _col0, _col1, _col2
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: rpad('hi', 1, '?')
+                  type: string
+                  expr: rpad('hi', 5, '.')
+                  type: string
+                  expr: rpad('hi', 6, '123')
+                  type: string
+            outputColumnNames: _col0, _col1, _col2
+            ListSink
 
 
 PREHOOK: query: SELECT
   rpad('hi', 1, '?'),
   rpad('hi', 5, '.'),
   rpad('hi', 6, '123')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -74,7 +63,7 @@ POSTHOOK: query: SELECT
   rpad('hi', 1, '?'),
   rpad('hi', 5, '.'),
   rpad('hi', 6, '123')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_second.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_second.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_second.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_second.q.out Thu Oct 31 16:00:36 2013
@@ -26,40 +26,29 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION second '2009-08-07 13:14:15')) (TOK_SELEXPR (TOK_FUNCTION second '13:14:15')) (TOK_SELEXPR (TOK_FUNCTION second '2009-08-07'))) (TOK_WHERE (= (TOK_TABLE_OR_COL key) 86))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Filter Operator
-              predicate:
-                  expr: (key = 86)
-                  type: boolean
-              Select Operator
-                expressions:
-                      expr: second('2009-08-07 13:14:15')
-                      type: int
-                      expr: second('13:14:15')
-                      type: int
-                      expr: second('2009-08-07')
-                      type: int
-                outputColumnNames: _col0, _col1, _col2
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
       limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Filter Operator
+            predicate:
+                expr: (key = 86)
+                type: boolean
+            Select Operator
+              expressions:
+                    expr: second('2009-08-07 13:14:15')
+                    type: int
+                    expr: second('13:14:15')
+                    type: int
+                    expr: second('2009-08-07')
+                    type: int
+              outputColumnNames: _col0, _col1, _col2
+              ListSink
 
 
 PREHOOK: query: SELECT second('2009-08-07 13:14:15'), second('13:14:15'), second('2009-08-07')

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_sign.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_sign.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_sign.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_sign.q.out Thu Oct 31 16:00:36 2013
@@ -1,65 +1,54 @@
-PREHOOK: query: explain 
-select sign(0) FROM src LIMIT 1
+PREHOOK: query: explain
+select sign(0) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain 
-select sign(0) FROM src LIMIT 1
+POSTHOOK: query: explain
+select sign(0) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sign 0))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sign 0)))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: sign(0)
-                    type: double
-              outputColumnNames: _col0
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: sign(0)
+                  type: double
+            outputColumnNames: _col0
+            ListSink
 
 
-PREHOOK: query: select sign(0) FROM src LIMIT 1
+PREHOOK: query: select sign(0) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select sign(0) FROM src LIMIT 1
+POSTHOOK: query: select sign(0) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 0.0
-PREHOOK: query: select sign(-45) FROM src LIMIT 1
+PREHOOK: query: select sign(-45) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select sign(-45) FROM src LIMIT 1
+POSTHOOK: query: select sign(-45) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -1.0
-PREHOOK: query: select sign(46)  FROM src LIMIT 1
+PREHOOK: query: select sign(46)  FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select sign(46)  FROM src LIMIT 1
+POSTHOOK: query: select sign(46)  FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -78,67 +67,56 @@ Example:
    > SELECT sign(40) FROM src LIMIT 1;
   1
 PREHOOK: query: explain 
-select sign(0) FROM src LIMIT 1
+select sign(0) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: explain 
-select sign(0) FROM src LIMIT 1
+select sign(0) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sign 0))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sign 0)))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: sign(0)
-                    type: double
-              outputColumnNames: _col0
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: sign(0)
+                  type: double
+            outputColumnNames: _col0
+            ListSink
 
 
-PREHOOK: query: select sign(0) FROM src LIMIT 1
+PREHOOK: query: select sign(0) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select sign(0) FROM src LIMIT 1
+POSTHOOK: query: select sign(0) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 0.0
-PREHOOK: query: select sign(-45) FROM src LIMIT 1
+PREHOOK: query: select sign(-45) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select sign(-45) FROM src LIMIT 1
+POSTHOOK: query: select sign(-45) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -1.0
-PREHOOK: query: select sign(46)  FROM src LIMIT 1
+PREHOOK: query: select sign(46)  FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select sign(46)  FROM src LIMIT 1
+POSTHOOK: query: select sign(46)  FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_sin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_sin.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_sin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_sin.q.out Thu Oct 31 16:00:36 2013
@@ -12,23 +12,23 @@ Example:
    > SELECT sin(0) FROM src LIMIT 1;
   0
 PREHOOK: query: SELECT sin(null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT sin(null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
 PREHOOK: query: SELECT sin(0.98), sin(1.57), sin(-0.5)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT sin(0.98), sin(1.57), sin(-0.5)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_size.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_size.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_size.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_size.q.out Thu Oct 31 16:00:36 2013
@@ -30,43 +30,32 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src_thrift))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION size (. (TOK_TABLE_OR_COL src_thrift) lint))) (TOK_SELEXPR (TOK_FUNCTION size (. (TOK_TABLE_OR_COL src_thrift) lintstring))) (TOK_SELEXPR (TOK_FUNCTION size (. (TOK_TABLE_OR_COL src_thrift) mstringstring))) (TOK_SELEXPR (TOK_FUNCTION size TOK_NULL))) (TOK_WHERE (AND (TOK_FUNCTION TOK_ISNOTNULL (. (TOK_TABLE_OR_COL src_thrift) lint)) (NOT (TOK_FUNCTION TOK_ISNULL (. (TOK_TABLE_OR_COL src_thrift) mstringstring))))) (TOK_LIMIT 1)))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src_thrift 
-          TableScan
-            alias: src_thrift
-            Filter Operator
-              predicate:
-                  expr: (lint is not null and (not mstringstring is null))
-                  type: boolean
-              Select Operator
-                expressions:
-                      expr: size(lint)
-                      type: int
-                      expr: size(lintstring)
-                      type: int
-                      expr: size(mstringstring)
-                      type: int
-                      expr: size(null)
-                      type: int
-                outputColumnNames: _col0, _col1, _col2, _col3
-                Limit
-                  File Output Operator
-                    compressed: false
-                    GlobalTableId: 0
-                    table:
-                        input format: org.apache.hadoop.mapred.TextInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
       limit: 1
+      Processor Tree:
+        TableScan
+          alias: src_thrift
+          Filter Operator
+            predicate:
+                expr: (lint is not null and (not mstringstring is null))
+                type: boolean
+            Select Operator
+              expressions:
+                    expr: size(lint)
+                    type: int
+                    expr: size(lintstring)
+                    type: int
+                    expr: size(mstringstring)
+                    type: int
+                    expr: size(null)
+                    type: int
+              outputColumnNames: _col0, _col1, _col2, _col3
+              Limit
+                ListSink
 
 
 PREHOOK: query: FROM src_thrift

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_sort_array.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_sort_array.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_sort_array.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_sort_array.q.out Thu Oct 31 16:00:36 2013
@@ -21,81 +21,70 @@ Example:
   'a', 'b', 'c', 'd'
 PREHOOK: query: -- Evaluate function against STRING valued keys
 EXPLAIN
-SELECT sort_array(array("b", "d", "c", "a")) FROM src LIMIT 1
+SELECT sort_array(array("b", "d", "c", "a")) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: -- Evaluate function against STRING valued keys
 EXPLAIN
-SELECT sort_array(array("b", "d", "c", "a")) FROM src LIMIT 1
+SELECT sort_array(array("b", "d", "c", "a")) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sort_array (TOK_FUNCTION array "b" "d" "c" "a")))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sort_array (TOK_FUNCTION array "b" "d" "c" "a"))))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: sort_array(array('b','d','c','a'))
-                    type: array<string>
-              outputColumnNames: _col0
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: sort_array(array('b','d','c','a'))
+                  type: array<string>
+            outputColumnNames: _col0
+            ListSink
 
 
-PREHOOK: query: SELECT sort_array(array("f", "a", "g", "c", "b", "d", "e")) FROM src LIMIT 1
+PREHOOK: query: SELECT sort_array(array("f", "a", "g", "c", "b", "d", "e")) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT sort_array(array("f", "a", "g", "c", "b", "d", "e")) FROM src LIMIT 1
+POSTHOOK: query: SELECT sort_array(array("f", "a", "g", "c", "b", "d", "e")) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 ["a","b","c","d","e","f","g"]
-PREHOOK: query: SELECT sort_array(sort_array(array("hadoop distributed file system", "enterprise databases", "hadoop map-reduce"))) FROM src LIMIT 1
+PREHOOK: query: SELECT sort_array(sort_array(array("hadoop distributed file system", "enterprise databases", "hadoop map-reduce"))) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT sort_array(sort_array(array("hadoop distributed file system", "enterprise databases", "hadoop map-reduce"))) FROM src LIMIT 1
+POSTHOOK: query: SELECT sort_array(sort_array(array("hadoop distributed file system", "enterprise databases", "hadoop map-reduce"))) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 ["enterprise databases","hadoop distributed file system","hadoop map-reduce"]
 PREHOOK: query: -- Evaluate function against INT valued keys
-SELECT sort_array(array(2, 9, 7, 3, 5, 4, 1, 6, 8)) FROM src LIMIT 1
+SELECT sort_array(array(2, 9, 7, 3, 5, 4, 1, 6, 8)) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- Evaluate function against INT valued keys
-SELECT sort_array(array(2, 9, 7, 3, 5, 4, 1, 6, 8)) FROM src LIMIT 1
+SELECT sort_array(array(2, 9, 7, 3, 5, 4, 1, 6, 8)) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 [1,2,3,4,5,6,7,8,9]
 PREHOOK: query: -- Evaluate function against FLOAT valued keys
-SELECT sort_array(sort_array(array(2.333, 9, 1.325, 2.003, 0.777, -3.445, 1))) FROM src LIMIT 1
+SELECT sort_array(sort_array(array(2.333, 9, 1.325, 2.003, 0.777, -3.445, 1))) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- Evaluate function against FLOAT valued keys
-SELECT sort_array(sort_array(array(2.333, 9, 1.325, 2.003, 0.777, -3.445, 1))) FROM src LIMIT 1
+SELECT sort_array(sort_array(array(2.333, 9, 1.325, 2.003, 0.777, -3.445, 1))) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_space.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_space.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_space.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_space.q.out Thu Oct 31 16:00:36 2013
@@ -17,7 +17,7 @@ PREHOOK: query: EXPLAIN SELECT
   space(1),
   space(-1),
   space(-100)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT
   space(10),
@@ -25,47 +25,36 @@ POSTHOOK: query: EXPLAIN SELECT
   space(1),
   space(-1),
   space(-100)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION space 10)) (TOK_SELEXPR (TOK_FUNCTION space 0)) (TOK_SELEXPR (TOK_FUNCTION space 1)) (TOK_SELEXPR (TOK_FUNCTION space (- 1))) (TOK_SELEXPR (TOK_FUNCTION space (- 100)))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION space 10)) (TOK_SELEXPR (TOK_FUNCTION space 0)) (TOK_SELEXPR (TOK_FUNCTION space 1)) (TOK_SELEXPR (TOK_FUNCTION space (- 1))) (TOK_SELEXPR (TOK_FUNCTION space (- 100))))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: space(10)
-                    type: string
-                    expr: space(0)
-                    type: string
-                    expr: space(1)
-                    type: string
-                    expr: space((- 1))
-                    type: string
-                    expr: space((- 100))
-                    type: string
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: space(10)
+                  type: string
+                  expr: space(0)
+                  type: string
+                  expr: space(1)
+                  type: string
+                  expr: space((- 1))
+                  type: string
+                  expr: space((- 100))
+                  type: string
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4
+            ListSink
 
 
 PREHOOK: query: SELECT
@@ -74,7 +63,7 @@ PREHOOK: query: SELECT
   length(space(1)),
   length(space(-1)),
   length(space(-100))
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -84,7 +73,7 @@ POSTHOOK: query: SELECT
   length(space(1)),
   length(space(-1)),
   length(space(-100))
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -95,7 +84,7 @@ PREHOOK: query: SELECT
   space(1),
   space(-1),
   space(-100)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -105,7 +94,7 @@ POSTHOOK: query: SELECT
   space(1),
   space(-1),
   space(-100)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_split.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_split.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_split.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_split.q.out Thu Oct 31 16:00:36 2013
@@ -16,52 +16,41 @@ PREHOOK: query: EXPLAIN SELECT 
   split('oneAtwoBthreeC', '[ABC]'),
   split('', '.'),
   split(50401020, 0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT 
   split('a b c', ' '),
   split('oneAtwoBthreeC', '[ABC]'),
   split('', '.'),
   split(50401020, 0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION split 'a b c' ' ')) (TOK_SELEXPR (TOK_FUNCTION split 'oneAtwoBthreeC' '[ABC]')) (TOK_SELEXPR (TOK_FUNCTION split '' '.')) (TOK_SELEXPR (TOK_FUNCTION split 50401020 0))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION split 'a b c' ' ')) (TOK_SELEXPR (TOK_FUNCTION split 'oneAtwoBthreeC' '[ABC]')) (TOK_SELEXPR (TOK_FUNCTION split '' '.')) (TOK_SELEXPR (TOK_FUNCTION split 50401020 0)))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: split('a b c', ' ')
-                    type: array<string>
-                    expr: split('oneAtwoBthreeC', '[ABC]')
-                    type: array<string>
-                    expr: split('', '.')
-                    type: array<string>
-                    expr: split(50401020, 0)
-                    type: array<string>
-              outputColumnNames: _col0, _col1, _col2, _col3
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: split('a b c', ' ')
+                  type: array<string>
+                  expr: split('oneAtwoBthreeC', '[ABC]')
+                  type: array<string>
+                  expr: split('', '.')
+                  type: array<string>
+                  expr: split(50401020, 0)
+                  type: array<string>
+            outputColumnNames: _col0, _col1, _col2, _col3
+            ListSink
 
 
 PREHOOK: query: SELECT 
@@ -69,7 +58,7 @@ PREHOOK: query: SELECT 
   split('oneAtwoBthreeC', '[ABC]'),
   split('', '.'),
   split(50401020, 0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -78,8 +67,8 @@ POSTHOOK: query: SELECT 
   split('oneAtwoBthreeC', '[ABC]'),
   split('', '.'),
   split(50401020, 0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-["a","b","c"]	["one","two","three",""]	[]	["5","4","1","2",""]
+["a","b","c"]	["one","two","three",""]	[""]	["5","4","1","2",""]

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_struct.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_struct.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_struct.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_struct.q.out Thu Oct 31 16:00:36 2013
@@ -10,58 +10,47 @@ POSTHOOK: type: DESCFUNCTION
 struct(col1, col2, col3, ...) - Creates a struct with the given field values
 PREHOOK: query: EXPLAIN
 SELECT struct(1), struct(1, "a"), struct(1, "b", 1.5).col1, struct(1, struct("a", 1.5)).col2.col1
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN
 SELECT struct(1), struct(1, "a"), struct(1, "b", 1.5).col1, struct(1, struct("a", 1.5)).col2.col1
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION struct 1)) (TOK_SELEXPR (TOK_FUNCTION struct 1 "a")) (TOK_SELEXPR (. (TOK_FUNCTION struct 1 "b" 1.5) col1)) (TOK_SELEXPR (. (. (TOK_FUNCTION struct 1 (TOK_FUNCTION struct "a" 1.5)) col2) col1))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION struct 1)) (TOK_SELEXPR (TOK_FUNCTION struct 1 "a")) (TOK_SELEXPR (. (TOK_FUNCTION struct 1 "b" 1.5) col1)) (TOK_SELEXPR (. (. (TOK_FUNCTION struct 1 (TOK_FUNCTION struct "a" 1.5)) col2) col1)))))
 
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        src 
-          TableScan
-            alias: src
-            Select Operator
-              expressions:
-                    expr: struct(1)
-                    type: struct<col1:int>
-                    expr: struct(1,'a')
-                    type: struct<col1:int,col2:string>
-                    expr: struct(1,'b',1.5).col1
-                    type: int
-                    expr: struct(1,struct('a',1.5)).col2.col1
-                    type: string
-              outputColumnNames: _col0, _col1, _col2, _col3
-              Limit
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: 1
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: struct(1)
+                  type: struct<col1:int>
+                  expr: struct(1,'a')
+                  type: struct<col1:int,col2:string>
+                  expr: struct(1,'b',1.5).col1
+                  type: int
+                  expr: struct(1,struct('a',1.5)).col2.col1
+                  type: string
+            outputColumnNames: _col0, _col1, _col2, _col3
+            ListSink
 
 
 PREHOOK: query: SELECT struct(1), struct(1, "a"), struct(1, "b", 1.5).col1, struct(1, struct("a", 1.5)).col2.col1
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT struct(1), struct(1, "a"), struct(1, "b", 1.5).col1, struct(1, struct("a", 1.5)).col2.col1
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_substr.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_substr.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_substr.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_substr.q.out Thu Oct 31 16:00:36 2013
@@ -21,7 +21,7 @@ PREHOOK: query: SELECT
   substr(null, 1), substr(null, 1, 1),
   substr('ABC', null), substr('ABC', null, 1),
   substr('ABC', 1, null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -29,7 +29,7 @@ POSTHOOK: query: SELECT
   substr(null, 1), substr(null, 1, 1),
   substr('ABC', null), substr('ABC', null, 1),
   substr('ABC', 1, null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -41,7 +41,7 @@ PREHOOK: query: SELECT
   substr('ABC', 100), substr('ABC', 100, 100),
   substr('ABC', -100), substr('ABC', -100, 100),
   substr('ABC', 2147483647), substr('ABC', 2147483647, 2147483647)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -52,7 +52,7 @@ POSTHOOK: query: SELECT
   substr('ABC', 100), substr('ABC', 100, 100),
   substr('ABC', -100), substr('ABC', -100, 100),
   substr('ABC', 2147483647), substr('ABC', 2147483647, 2147483647)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -63,7 +63,7 @@ PREHOOK: query: SELECT
   substr('ABC', 0), substr('ABC', 1), substr('ABC', 2), substr('ABC', 3),
   substr('ABC', 1, 2147483647), substr('ABC', 2, 2147483647),
   substr('A', 0), substr('A', 1), substr('A', -1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -73,7 +73,7 @@ POSTHOOK: query: SELECT
   substr('ABC', 0), substr('ABC', 1), substr('ABC', 2), substr('ABC', 3),
   substr('ABC', 1, 2147483647), substr('ABC', 2, 2147483647),
   substr('A', 0), substr('A', 1), substr('A', -1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -84,7 +84,7 @@ PREHOOK: query: SELECT
   substr('ABC', 2, 1), substr('ABC', 2, 2), substr('ABC', 2, 3), substr('ABC', 2, 4),
   substr('ABC', 3, 1), substr('ABC', 3, 2), substr('ABC', 3, 3), substr('ABC', 3, 4),
   substr('ABC', 4, 1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -94,7 +94,7 @@ POSTHOOK: query: SELECT
   substr('ABC', 2, 1), substr('ABC', 2, 2), substr('ABC', 2, 3), substr('ABC', 2, 4),
   substr('ABC', 3, 1), substr('ABC', 3, 2), substr('ABC', 3, 3), substr('ABC', 3, 4),
   substr('ABC', 4, 1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -104,7 +104,7 @@ PREHOOK: query: SELECT
   substr('ABC', -2, 1), substr('ABC', -2, 2), substr('ABC', -2, 3), substr('ABC', -2, 4),
   substr('ABC', -3, 1), substr('ABC', -3, 2), substr('ABC', -3, 3), substr('ABC', -3, 4),
   substr('ABC', -4, 1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -113,7 +113,7 @@ POSTHOOK: query: SELECT
   substr('ABC', -2, 1), substr('ABC', -2, 2), substr('ABC', -2, 3), substr('ABC', -2, 4),
   substr('ABC', -3, 1), substr('ABC', -3, 2), substr('ABC', -3, 3), substr('ABC', -3, 4),
   substr('ABC', -4, 1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -125,7 +125,7 @@ SELECT
   substring('ABC', 0), substring('ABC', 1), substring('ABC', 2), substring('ABC', 3),
   substring('ABC', 1, 2147483647), substring('ABC', 2, 2147483647),
   substring('A', 0), substring('A', 1), substring('A', -1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -136,7 +136,7 @@ SELECT
   substring('ABC', 0), substring('ABC', 1), substring('ABC', 2), substring('ABC', 3),
   substring('ABC', 1, 2147483647), substring('ABC', 2, 2147483647),
   substring('A', 0), substring('A', 1), substring('A', -1)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -156,7 +156,7 @@ SELECT
   substr(ABC, -3, 1), substr(ABC, -3, 2), substr(ABC, -3, 3), substr(ABC, -3, 4),
   substr(ABC, -4, 1)
 FROM (
-   select CAST(concat(substr(value, 1, 0), 'ABC') as BINARY) as ABC from src LIMIT 1
+   select CAST(concat(substr(value, 1, 0), 'ABC') as BINARY) as ABC from src tablesample (1 rows)
 ) X
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -176,7 +176,7 @@ SELECT
   substr(ABC, -3, 1), substr(ABC, -3, 2), substr(ABC, -3, 3), substr(ABC, -3, 4),
   substr(ABC, -4, 1)
 FROM (
-   select CAST(concat(substr(value, 1, 0), 'ABC') as BINARY) as ABC from src LIMIT 1
+   select CAST(concat(substr(value, 1, 0), 'ABC') as BINARY) as ABC from src tablesample (1 rows)
 ) X
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
@@ -188,7 +188,7 @@ SELECT
   substr("abc 玩", 5),
   substr("abc 玩玩玩 abc", 5),
   substr("abc 玩玩玩 abc", 5, 3)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -198,7 +198,7 @@ SELECT
   substr("abc 玩", 5),
   substr("abc 玩玩玩 abc", 5),
   substr("abc 玩玩玩 abc", 5, 3)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_tan.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_tan.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_tan.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_tan.q.out Thu Oct 31 16:00:36 2013
@@ -12,23 +12,23 @@ Example:
    > SELECT tan(0) FROM src LIMIT 1;
   1
 PREHOOK: query: SELECT tan(null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT tan(null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
 PREHOOK: query: SELECT tan(1), tan(6), tan(-1.0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT tan(1), tan(6), tan(-1.0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -47,23 +47,23 @@ Example:
    > SELECT tan(0) FROM src LIMIT 1;
   1
 PREHOOK: query: SELECT tan(null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT tan(null)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
 PREHOOK: query: SELECT tan(1), tan(6), tan(-1.0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT tan(1), tan(6), tan(-1.0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_testlength.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_testlength.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_testlength.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_testlength.q.out Thu Oct 31 16:00:36 2013
@@ -18,29 +18,14 @@ PREHOOK: query: CREATE TEMPORARY FUNCTIO
 PREHOOK: type: CREATEFUNCTION
 POSTHOOK: query: CREATE TEMPORARY FUNCTION testlength AS 'org.apache.hadoop.hive.ql.udf.UDFTestLength'
 POSTHOOK: type: CREATEFUNCTION
-PREHOOK: query: CREATE TABLE dest1(len INT)
-PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE dest1(len INT)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: default@dest1
-PREHOOK: query: FROM src INSERT OVERWRITE TABLE dest1 SELECT testlength(src.value)
+PREHOOK: query: SELECT testlength(src.value) FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: default@dest1
-POSTHOOK: query: FROM src INSERT OVERWRITE TABLE dest1 SELECT testlength(src.value)
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@dest1
-POSTHOOK: Lineage: dest1.len EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: SELECT dest1.* FROM dest1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest1
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT dest1.* FROM dest1
+POSTHOOK: query: SELECT testlength(src.value) FROM src
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest1
+POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: Lineage: dest1.len EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 7
 6
 7
@@ -545,4 +530,3 @@ PREHOOK: query: DROP TEMPORARY FUNCTION 
 PREHOOK: type: DROPFUNCTION
 POSTHOOK: query: DROP TEMPORARY FUNCTION testlength
 POSTHOOK: type: DROPFUNCTION
-POSTHOOK: Lineage: dest1.len EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_testlength2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_testlength2.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_testlength2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_testlength2.q.out Thu Oct 31 16:00:36 2013
@@ -18,29 +18,14 @@ PREHOOK: query: CREATE TEMPORARY FUNCTIO
 PREHOOK: type: CREATEFUNCTION
 POSTHOOK: query: CREATE TEMPORARY FUNCTION testlength2 AS 'org.apache.hadoop.hive.ql.udf.UDFTestLength2'
 POSTHOOK: type: CREATEFUNCTION
-PREHOOK: query: CREATE TABLE dest1(len INT)
-PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE dest1(len INT)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: default@dest1
-PREHOOK: query: FROM src INSERT OVERWRITE TABLE dest1 SELECT testlength2(src.value)
+PREHOOK: query: SELECT testlength2(src.value) FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
-PREHOOK: Output: default@dest1
-POSTHOOK: query: FROM src INSERT OVERWRITE TABLE dest1 SELECT testlength2(src.value)
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@dest1
-POSTHOOK: Lineage: dest1.len EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: SELECT dest1.* FROM dest1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest1
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT dest1.* FROM dest1
+POSTHOOK: query: SELECT testlength2(src.value) FROM src
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest1
+POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: Lineage: dest1.len EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 7
 6
 7
@@ -545,4 +530,3 @@ PREHOOK: query: DROP TEMPORARY FUNCTION 
 PREHOOK: type: DROPFUNCTION
 POSTHOOK: query: DROP TEMPORARY FUNCTION testlength2
 POSTHOOK: type: DROPFUNCTION
-POSTHOOK: Lineage: dest1.len EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_to_boolean.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_to_boolean.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_to_boolean.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_to_boolean.q.out Thu Oct 31 16:00:36 2013
@@ -1,261 +1,261 @@
-PREHOOK: query: -- 'true' cases: 
+PREHOOK: query: -- 'true' cases:
 
-SELECT CAST(CAST(1 AS TINYINT) AS BOOLEAN) FROM src LIMIT 1
+SELECT CAST(CAST(1 AS TINYINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: -- 'true' cases: 
+POSTHOOK: query: -- 'true' cases:
 
-SELECT CAST(CAST(1 AS TINYINT) AS BOOLEAN) FROM src LIMIT 1
+SELECT CAST(CAST(1 AS TINYINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST(2 AS SMALLINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(2 AS SMALLINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(2 AS SMALLINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(2 AS SMALLINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST(-4 AS INT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-4 AS INT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-4 AS INT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-4 AS INT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST(-444 AS BIGINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-444 AS BIGINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-444 AS BIGINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-444 AS BIGINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST(7.0 AS FLOAT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(7.0 AS FLOAT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(7.0 AS FLOAT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(7.0 AS FLOAT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST(-8.0 AS DOUBLE) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-8.0 AS DOUBLE) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-8.0 AS DOUBLE) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-8.0 AS DOUBLE) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST(-99.0 AS DECIMAL) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-99.0 AS DECIMAL) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-99.0 AS DECIMAL) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-99.0 AS DECIMAL) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST('Foo' AS STRING) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST('Foo' AS STRING) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST('Foo' AS STRING) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST('Foo' AS STRING) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: SELECT CAST(CAST('2011-05-06 07:08:09' as timestamp) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST('2011-05-06 07:08:09' as timestamp) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST('2011-05-06 07:08:09' as timestamp) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST('2011-05-06 07:08:09' as timestamp) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
 PREHOOK: query: -- 'false' cases: 
 
-SELECT CAST(CAST(0 AS TINYINT) AS BOOLEAN) FROM src LIMIT 1
+SELECT CAST(CAST(0 AS TINYINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- 'false' cases: 
 
-SELECT CAST(CAST(0 AS TINYINT) AS BOOLEAN) FROM src LIMIT 1
+SELECT CAST(CAST(0 AS TINYINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0 AS SMALLINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0 AS SMALLINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0 AS SMALLINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0 AS SMALLINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0 AS INT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0 AS INT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0 AS INT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0 AS INT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0 AS BIGINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0 AS BIGINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0 AS BIGINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0 AS BIGINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0.0 AS FLOAT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0.0 AS FLOAT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0.0 AS FLOAT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0.0 AS FLOAT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0.0 AS DOUBLE) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0.0 AS DOUBLE) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0.0 AS DOUBLE) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0.0 AS DOUBLE) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0.0 AS DECIMAL) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0.0 AS DECIMAL) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0.0 AS DECIMAL) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0.0 AS DECIMAL) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST('' AS STRING) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST('' AS STRING) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST('' AS STRING) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST('' AS STRING) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
-PREHOOK: query: SELECT CAST(CAST(0 as timestamp) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(0 as timestamp) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(0 as timestamp) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(0 as timestamp) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 false
 PREHOOK: query: -- 'NULL' cases:
-SELECT CAST(NULL AS BOOLEAN) FROM src LIMIT 1
+SELECT CAST(NULL AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- 'NULL' cases:
-SELECT CAST(NULL AS BOOLEAN) FROM src LIMIT 1
+SELECT CAST(NULL AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS TINYINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS TINYINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS TINYINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS TINYINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS SMALLINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS SMALLINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS SMALLINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS SMALLINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS INT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS INT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS INT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS INT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS BIGINT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS BIGINT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS BIGINT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS BIGINT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS FLOAT) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS FLOAT) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS FLOAT) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS FLOAT) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS DOUBLE) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS DOUBLE) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS DOUBLE) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS DOUBLE) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS DECIMAL) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS DECIMAL) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS DECIMAL) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS DECIMAL) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL AS STRING) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL AS STRING) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL AS STRING) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL AS STRING) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(CAST(NULL as timestamp) AS BOOLEAN) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(NULL as timestamp) AS BOOLEAN) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(NULL as timestamp) AS BOOLEAN) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(NULL as timestamp) AS BOOLEAN) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_to_byte.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_to_byte.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_to_byte.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_to_byte.q.out Thu Oct 31 16:00:36 2013
@@ -1,82 +1,82 @@
-PREHOOK: query: -- Conversion of main primitive types to Byte type: 
-SELECT CAST(NULL AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: -- Conversion of main primitive types to Byte type:
+SELECT CAST(NULL AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: -- Conversion of main primitive types to Byte type: 
-SELECT CAST(NULL AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: -- Conversion of main primitive types to Byte type:
+SELECT CAST(NULL AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(TRUE AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(TRUE AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(TRUE AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(TRUE AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 1
-PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -18
-PREHOOK: query: SELECT CAST(-129 AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(-129 AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(-129 AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(-129 AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 127
-PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -1
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST('-38' AS TINYINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST('-38' AS TINYINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST('-38' AS TINYINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST('-38' AS TINYINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_to_double.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_to_double.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_to_double.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_to_double.q.out Thu Oct 31 16:00:36 2013
@@ -1,82 +1,82 @@
-PREHOOK: query: -- Conversion of main primitive types to Double type: 
-SELECT CAST(NULL AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: -- Conversion of main primitive types to Double type:
+SELECT CAST(NULL AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: -- Conversion of main primitive types to Double type: 
-SELECT CAST(NULL AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: -- Conversion of main primitive types to Double type:
+SELECT CAST(NULL AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(TRUE AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(TRUE AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(TRUE AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(TRUE AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 1.0
-PREHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -7.0
-PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -18.0
-PREHOOK: query: SELECT CAST(-129 AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(-129 AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(-129 AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(-129 AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -129.0
-PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -1025.0
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3.140000104904175
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3.14
-PREHOOK: query: SELECT CAST('-38.14' AS DOUBLE) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST('-38.14' AS DOUBLE) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST('-38.14' AS DOUBLE) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST('-38.14' AS DOUBLE) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_to_float.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_to_float.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_to_float.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_to_float.q.out Thu Oct 31 16:00:36 2013
@@ -1,82 +1,82 @@
-PREHOOK: query: -- Conversion of main primitive types to Float type: 
-SELECT CAST(NULL AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: -- Conversion of main primitive types to Float type:
+SELECT CAST(NULL AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: -- Conversion of main primitive types to Float type: 
-SELECT CAST(NULL AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: -- Conversion of main primitive types to Float type:
+SELECT CAST(NULL AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(TRUE AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(TRUE AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(TRUE AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(TRUE AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 1.0
-PREHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -7.0
-PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -18.0
-PREHOOK: query: SELECT CAST(-129 AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(-129 AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(-129 AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(-129 AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -129.0
-PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -1025.0
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3.14
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL(3,2)) AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3.14
-PREHOOK: query: SELECT CAST('-38.14' AS FLOAT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST('-38.14' AS FLOAT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST('-38.14' AS FLOAT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST('-38.14' AS FLOAT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_to_long.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_to_long.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_to_long.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_to_long.q.out Thu Oct 31 16:00:36 2013
@@ -1,82 +1,82 @@
-PREHOOK: query: -- Conversion of main primitive types to Long type: 
-SELECT CAST(NULL AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: -- Conversion of main primitive types to Long type:
+SELECT CAST(NULL AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: -- Conversion of main primitive types to Long type: 
-SELECT CAST(NULL AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: -- Conversion of main primitive types to Long type:
+SELECT CAST(NULL AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(TRUE AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(TRUE AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(TRUE AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(TRUE AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 1
-PREHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-7 AS TINYINT) AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -7
-PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-18 AS SMALLINT) AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -18
-PREHOOK: query: SELECT CAST(-129 AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(-129 AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(-129 AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(-129 AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -129
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST('-38' AS BIGINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST('-38' AS BIGINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST('-38' AS BIGINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST('-38' AS BIGINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_to_short.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_to_short.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_to_short.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_to_short.q.out Thu Oct 31 16:00:36 2013
@@ -1,82 +1,82 @@
-PREHOOK: query: -- Conversion of main primitive types to Short type: 
-SELECT CAST(NULL AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: -- Conversion of main primitive types to Short type:
+SELECT CAST(NULL AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: -- Conversion of main primitive types to Short type: 
-SELECT CAST(NULL AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: -- Conversion of main primitive types to Short type:
+SELECT CAST(NULL AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 NULL
-PREHOOK: query: SELECT CAST(TRUE AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(TRUE AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(TRUE AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(TRUE AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 1
-PREHOOK: query: SELECT CAST(CAST(-18 AS TINYINT) AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-18 AS TINYINT) AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-18 AS TINYINT) AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-18 AS TINYINT) AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -18
-PREHOOK: query: SELECT CAST(-129 AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(-129 AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(-129 AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(-129 AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -129
-PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-1025 AS BIGINT) AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -1025
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DOUBLE) AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS FLOAT) AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST(CAST(-3.14 AS DECIMAL) AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -3
-PREHOOK: query: SELECT CAST('-38' AS SMALLINT) FROM src LIMIT 1
+PREHOOK: query: SELECT CAST('-38' AS SMALLINT) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT CAST('-38' AS SMALLINT) FROM src LIMIT 1
+POSTHOOK: query: SELECT CAST('-38' AS SMALLINT) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####



Mime
View raw message