hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1537540 [6/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_array.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_array.q.out Thu Oct 31 16:00:36 2013
@@ -9,63 +9,52 @@ POSTHOOK: query: DESCRIBE FUNCTION EXTEN
 POSTHOOK: type: DESCFUNCTION
 array(n0, n1...) - Creates an array with the given elements 
 PREHOOK: query: EXPLAIN SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
-array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
+array(array(1), array(2), array(3), array(4))[1][0] FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
-array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
+array(array(1), array(2), array(3), array(4))[1][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 array)) (TOK_SELEXPR ([ (TOK_FUNCTION array) 1)) (TOK_SELEXPR (TOK_FUNCTION array 1 2 3)) (TOK_SELEXPR ([ (TOK_FUNCTION array 1 2 3) 2)) (TOK_SELEXPR (TOK_FUNCTION array 1 "a" 2 3)) (TOK_SELEXPR ([ (TOK_FUNCTION array 1 "a" 2 3) 2)) (TOK_SELEXPR ([ ([ (TOK_FUNCTION array (TOK_FUNCTION array 1) (TOK_FUNCTION array 2) (TOK_FUNCTION array 3) (TOK_FUNCTION array 4)) 1) 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 array)) (TOK_SELEXPR ([ (TOK_FUNCTION array) 1)) (TOK_SELEXPR (TOK_FUNCTION array 1 2 3)) (TOK_SELEXPR ([ (TOK_FUNCTION array 1 2 3) 2)) (TOK_SELEXPR (TOK_FUNCTION array 1 "a" 2 3)) (TOK_SELEXPR ([ (TOK_FUNCTION array 1 "a" 2 3) 2)) (TOK_SELEXPR ([ ([ (TOK_FUNCTION array (TOK_FUNCTION array 1) (TOK_FUNCTION array 2) (TOK_FUNCTION array 3) (TOK_FUNCTION array 4)) 1) 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: array()
-                    type: array<string>
-                    expr: array()[1]
-                    type: string
-                    expr: array(1,2,3)
-                    type: array<int>
-                    expr: array(1,2,3)[2]
-                    type: int
-                    expr: array(1,'a',2,3)
-                    type: array<string>
-                    expr: array(1,'a',2,3)[2]
-                    type: string
-                    expr: array(array(1),array(2),array(3),array(4))[1][0]
-                    type: int
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-              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: array()
+                  type: array<string>
+                  expr: array()[1]
+                  type: string
+                  expr: array(1,2,3)
+                  type: array<int>
+                  expr: array(1,2,3)[2]
+                  type: int
+                  expr: array(1,'a',2,3)
+                  type: array<string>
+                  expr: array(1,'a',2,3)[2]
+                  type: string
+                  expr: array(array(1),array(2),array(3),array(4))[1][0]
+                  type: int
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+            ListSink
 
 
 PREHOOK: query: SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
-array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
+array(array(1), array(2), array(3), array(4))[1][0] FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT array(), array()[1], array(1, 2, 3), array(1, 2, 3)[2], array(1,"a", 2, 3), array(1,"a", 2, 3)[2],
-array(array(1), array(2), array(3), array(4))[1][0] FROM src LIMIT 1
+array(array(1), array(2), array(3), array(4))[1][0] 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_array_contains.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_array_contains.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_array_contains.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_array_contains.q.out Thu Oct 31 16:00:36 2013
@@ -12,25 +12,25 @@ Example:
   > SELECT array_contains(array(1, 2, 3), 2) FROM src LIMIT 1;
   true
 PREHOOK: query: -- evalutes function for array of primitives
-SELECT array_contains(array(1, 2, 3), 1) FROM src LIMIT 1
+SELECT array_contains(array(1, 2, 3), 1) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- evalutes function for array of primitives
-SELECT array_contains(array(1, 2, 3), 1) FROM src LIMIT 1
+SELECT array_contains(array(1, 2, 3), 1) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
 PREHOOK: query: -- evaluates function for nested arrays
 SELECT array_contains(array(array(1,2), array(2,3), array(3,4)), array(1,2))
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- evaluates function for nested arrays
 SELECT array_contains(array(array(1,2), array(2,3), array(3,4)), array(1,2))
-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_ascii.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_ascii.q.out Thu Oct 31 16:00:36 2013
@@ -17,56 +17,45 @@ PREHOOK: query: EXPLAIN SELECT
   ascii('Facebook'),
   ascii(''),
   ascii('!')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT
   ascii('Facebook'),
   ascii(''),
   ascii('!')
-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 ascii 'Facebook')) (TOK_SELEXPR (TOK_FUNCTION ascii '')) (TOK_SELEXPR (TOK_FUNCTION ascii '!'))) (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 ascii 'Facebook')) (TOK_SELEXPR (TOK_FUNCTION ascii '')) (TOK_SELEXPR (TOK_FUNCTION ascii '!')))))
 
 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: ascii('Facebook')
-                    type: int
-                    expr: ascii('')
-                    type: int
-                    expr: ascii('!')
-                    type: int
-              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: ascii('Facebook')
+                  type: int
+                  expr: ascii('')
+                  type: int
+                  expr: ascii('!')
+                  type: int
+            outputColumnNames: _col0, _col1, _col2
+            ListSink
 
 
 PREHOOK: query: SELECT
   ascii('Facebook'),
   ascii(''),
   ascii('!')
-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
   ascii('Facebook'),
   ascii(''),
   ascii('!')
-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_asin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_asin.q.out Thu Oct 31 16:00:36 2013
@@ -14,45 +14,45 @@ Example:
   > SELECT asin(2) FROM src LIMIT 1;
   NULL
 PREHOOK: query: SELECT asin(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 asin(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 asin(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 asin(0)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 0.0
 PREHOOK: query: SELECT asin(-0.5), asin(0.66)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT asin(-0.5), asin(0.66)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -0.5235987755982989	0.7208187608700897
 PREHOOK: query: SELECT asin(2)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT asin(2)
-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_atan.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_atan.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_atan.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_atan.q.out Thu Oct 31 16:00:36 2013
@@ -12,23 +12,23 @@ Example:
    > SELECT atan(0) FROM src LIMIT 1;
   0
 PREHOOK: query: SELECT atan(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 atan(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 atan(1), atan(6), atan(-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 atan(1), atan(6), atan(-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 atan(0) FROM src LIMIT 1;
   0
 PREHOOK: query: SELECT atan(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 atan(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 atan(1), atan(6), atan(-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 atan(1), atan(6), atan(-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_between.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_between.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_between.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_between.q.out Thu Oct 31 16:00:36 2013
@@ -16,39 +16,28 @@ 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_ALLCOLREF)) (TOK_WHERE (TOK_FUNCTION between KW_FALSE (+ (TOK_TABLE_OR_COL key) 100) (+ 150 (- 50)) (+ 150 50))) (TOK_LIMIT 20)))
 
 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 + 100) BETWEEN (150 + (- 50)) AND (150 + 50)
-                  type: boolean
-              Select Operator
-                expressions:
-                      expr: key
-                      type: string
-                      expr: value
-                      type: string
-                outputColumnNames: _col0, _col1
-                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: 20
+      Processor Tree:
+        TableScan
+          alias: src
+          Filter Operator
+            predicate:
+                expr: (key + 100) BETWEEN (150 + (- 50)) AND (150 + 50)
+                type: boolean
+            Select Operator
+              expressions:
+                    expr: key
+                    type: string
+                    expr: value
+                    type: string
+              outputColumnNames: _col0, _col1
+              Limit
+                ListSink
 
 
 PREHOOK: query: SELECT * FROM src where key + 100 between (150 + -50) AND (150 + 50) LIMIT 20
@@ -87,39 +76,28 @@ 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_ALLCOLREF)) (TOK_WHERE (TOK_FUNCTION between KW_TRUE (+ (TOK_TABLE_OR_COL key) 100) (+ 150 (- 50)) (+ 150 50))) (TOK_LIMIT 20)))
 
 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 + 100) NOT BETWEEN (150 + (- 50)) AND (150 + 50)
-                  type: boolean
-              Select Operator
-                expressions:
-                      expr: key
-                      type: string
-                      expr: value
-                      type: string
-                outputColumnNames: _col0, _col1
-                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: 20
+      Processor Tree:
+        TableScan
+          alias: src
+          Filter Operator
+            predicate:
+                expr: (key + 100) NOT BETWEEN (150 + (- 50)) AND (150 + 50)
+                type: boolean
+            Select Operator
+              expressions:
+                    expr: key
+                    type: string
+                    expr: value
+                    type: string
+              outputColumnNames: _col0, _col1
+              Limit
+                ListSink
 
 
 PREHOOK: query: SELECT * FROM src where key + 100 not between (150 + -50) AND (150 + 50) LIMIT 20
@@ -158,39 +136,28 @@ 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_ALLCOLREF)) (TOK_WHERE (TOK_FUNCTION between KW_FALSE 'b' 'a' 'c')) (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 
-          TableScan
-            alias: src
-            Filter Operator
-              predicate:
-                  expr: 'b' BETWEEN 'a' AND 'c'
-                  type: boolean
-              Select Operator
-                expressions:
-                      expr: key
-                      type: string
-                      expr: value
-                      type: string
-                outputColumnNames: _col0, _col1
-                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
+          Filter Operator
+            predicate:
+                expr: 'b' BETWEEN 'a' AND 'c'
+                type: boolean
+            Select Operator
+              expressions:
+                    expr: key
+                    type: string
+                    expr: value
+                    type: string
+              outputColumnNames: _col0, _col1
+              Limit
+                ListSink
 
 
 PREHOOK: query: SELECT * FROM src where 'b' between 'a' AND 'c' LIMIT 1
@@ -210,39 +177,28 @@ 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_ALLCOLREF)) (TOK_WHERE (TOK_FUNCTION between KW_FALSE 2 2 '3')) (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 
-          TableScan
-            alias: src
-            Filter Operator
-              predicate:
-                  expr: 2 BETWEEN 2 AND '3'
-                  type: boolean
-              Select Operator
-                expressions:
-                      expr: key
-                      type: string
-                      expr: value
-                      type: string
-                outputColumnNames: _col0, _col1
-                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
+          Filter Operator
+            predicate:
+                expr: 2 BETWEEN 2 AND '3'
+                type: boolean
+            Select Operator
+              expressions:
+                    expr: key
+                    type: string
+                    expr: value
+                    type: string
+              outputColumnNames: _col0, _col1
+              Limit
+                ListSink
 
 
 PREHOOK: query: SELECT * FROM src where 2 between 2 AND '3' LIMIT 1

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_bin.q.out Thu Oct 31 16:00:36 2013
@@ -16,7 +16,7 @@ PREHOOK: query: SELECT
   bin(1),
   bin(0),
   bin(99992421)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -24,18 +24,18 @@ POSTHOOK: query: SELECT
   bin(1),
   bin(0),
   bin(99992421)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 1	0	101111101011100001101100101
 PREHOOK: query: -- Negative numbers should be treated as two's complement (64 bit).
-SELECT bin(-5) FROM src LIMIT 1
+SELECT bin(-5) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: -- Negative numbers should be treated as two's complement (64 bit).
-SELECT bin(-5) FROM src LIMIT 1
+SELECT bin(-5) 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_bitmap_and.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_and.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_and.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_and.q.out Thu Oct 31 16:00:36 2013
@@ -1,17 +1,17 @@
-PREHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src limit 1
+PREHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src limit 1
+POSTHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 [13,2,4,8589934592,4096,0]
-PREHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src limit 1
+PREHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src limit 1
+POSTHOOK: query: select ewah_bitmap_and(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -26,12 +26,12 @@ POSTHOOK: query: create table bitmap_tes
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bitmap_test
 PREHOOK: query: insert overwrite table bitmap_test
-select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src limit 10
+select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src tablesample (10 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@bitmap_test
 POSTHOOK: query: insert overwrite table bitmap_test
-select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src limit 10
+select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src tablesample (10 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@bitmap_test

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_empty.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_empty.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_empty.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_empty.q.out Thu Oct 31 16:00:36 2013
@@ -1,17 +1,17 @@
-PREHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,0,0)) from src limit 1
+PREHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,0,0)) from src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,0,0)) from src limit 1
+POSTHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,0,0)) from src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 true
-PREHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,4096,0)) from src limit 1
+PREHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,4096,0)) from src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,4096,0)) from src limit 1
+POSTHOOK: query: select ewah_bitmap_empty(array(13,2,4,8589934592,4096,0)) 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_bitmap_or.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_or.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_or.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_or.q.out Thu Oct 31 16:00:36 2013
@@ -1,17 +1,17 @@
-PREHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src limit 1
+PREHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src limit 1
+POSTHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(13,2,4,8589934592,4096,0)) from src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 [13,2,4,8589934592,4096,0]
-PREHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src limit 1
+PREHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src limit 1
+POSTHOOK: query: select ewah_bitmap_or(array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0)) from src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -26,12 +26,12 @@ POSTHOOK: query: create table bitmap_tes
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bitmap_test
 PREHOOK: query: insert overwrite table bitmap_test
-select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src limit 10
+select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src tablesample (10 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@bitmap_test
 POSTHOOK: query: insert overwrite table bitmap_test
-select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src limit 10
+select array(13,2,4,8589934592,4096,0), array(8,2,4,8589934592,128,0) from src tablesample (10 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@bitmap_test

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out Thu Oct 31 16:00:36 2013
@@ -34,7 +34,7 @@ SELECT CASE 1
         WHEN 22 THEN 23
         WHEN 21 THEN 24
        END
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN
 SELECT CASE 1
@@ -62,49 +62,38 @@ SELECT CASE 1
         WHEN 22 THEN 23
         WHEN 21 THEN 24
        END
-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 CASE 1 1 2 3 4 5)) (TOK_SELEXPR (TOK_FUNCTION CASE 2 1 2 5)) (TOK_SELEXPR (TOK_FUNCTION CASE 14 12 13 14 15)) (TOK_SELEXPR (TOK_FUNCTION CASE 16 12 13 14 15)) (TOK_SELEXPR (TOK_FUNCTION CASE 17 18 TOK_NULL 17 20)) (TOK_SELEXPR (TOK_FUNCTION CASE 21 22 23 21 24))) (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 CASE 1 1 2 3 4 5)) (TOK_SELEXPR (TOK_FUNCTION CASE 2 1 2 5)) (TOK_SELEXPR (TOK_FUNCTION CASE 14 12 13 14 15)) (TOK_SELEXPR (TOK_FUNCTION CASE 16 12 13 14 15)) (TOK_SELEXPR (TOK_FUNCTION CASE 17 18 TOK_NULL 17 20)) (TOK_SELEXPR (TOK_FUNCTION CASE 21 22 23 21 24)))))
 
 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: CASE (1) WHEN (1) THEN (2) WHEN (3) THEN (4) ELSE (5) END
-                    type: int
-                    expr: CASE (2) WHEN (1) THEN (2) ELSE (5) END
-                    type: int
-                    expr: CASE (14) WHEN (12) THEN (13) WHEN (14) THEN (15) END
-                    type: int
-                    expr: CASE (16) WHEN (12) THEN (13) WHEN (14) THEN (15) END
-                    type: int
-                    expr: CASE (17) WHEN (18) THEN (null) WHEN (17) THEN (20) END
-                    type: int
-                    expr: CASE (21) WHEN (22) THEN (23) WHEN (21) THEN (24) END
-                    type: int
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-              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: CASE (1) WHEN (1) THEN (2) WHEN (3) THEN (4) ELSE (5) END
+                  type: int
+                  expr: CASE (2) WHEN (1) THEN (2) ELSE (5) END
+                  type: int
+                  expr: CASE (14) WHEN (12) THEN (13) WHEN (14) THEN (15) END
+                  type: int
+                  expr: CASE (16) WHEN (12) THEN (13) WHEN (14) THEN (15) END
+                  type: int
+                  expr: CASE (17) WHEN (18) THEN (null) WHEN (17) THEN (20) END
+                  type: int
+                  expr: CASE (21) WHEN (22) THEN (23) WHEN (21) THEN (24) END
+                  type: int
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            ListSink
 
 
 PREHOOK: query: SELECT CASE 1
@@ -132,7 +121,7 @@ PREHOOK: query: SELECT CASE 1
         WHEN 22 THEN 23
         WHEN 21 THEN 24
        END
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -161,7 +150,7 @@ POSTHOOK: query: SELECT CASE 1
         WHEN 22 THEN 23
         WHEN 21 THEN 24
        END
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -170,7 +159,7 @@ PREHOOK: query: -- verify that short-cir
 -- we should never get to the ELSE branch, which would raise an exception
 SELECT CASE 1 WHEN 1 THEN 'yo'
 ELSE reflect('java.lang.String', 'bogus', 1) END
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -178,7 +167,7 @@ POSTHOOK: query: -- verify that short-ci
 -- we should never get to the ELSE branch, which would raise an exception
 SELECT CASE 1 WHEN 1 THEN 'yo'
 ELSE reflect('java.lang.String', 'bogus', 1) END
-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_case_thrift.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_case_thrift.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_case_thrift.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_case_thrift.q.out Thu Oct 31 16:00:36 2013
@@ -14,7 +14,7 @@ SELECT CASE src_thrift.lint[0]
         WHEN '0' THEN src_thrift.lstring
         ELSE NULL
        END)[0]
-FROM src_thrift LIMIT 3
+FROM src_thrift tablesample (3 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN
 SELECT CASE src_thrift.lint[0]
@@ -32,43 +32,32 @@ SELECT CASE src_thrift.lint[0]
         WHEN '0' THEN src_thrift.lstring
         ELSE NULL
        END)[0]
-FROM src_thrift LIMIT 3
+FROM src_thrift tablesample (3 rows)
 POSTHOOK: type: QUERY
 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 CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 0 (+ ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 1) 1 (+ ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 2) 2 100 5)) (TOK_SELEXPR (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) '0' 'zero' '10' (TOK_FUNCTION CONCAT ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) " is ten") 'default')) (TOK_SELEXPR ([ (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) '0' (. (TOK_TABLE_OR_COL src_thrift) lstring) TOK_NULL) 0))) (TOK_LIMIT 3)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src_thrift) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 3))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 0 (+ ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 1) 1 (+ ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 2) 2 100 5)) (TOK_SELEXPR (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) '0' 'zero' '10' (TOK_FUNCTION CONCAT ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) " is ten") 'default')) (TOK_SELEXPR ([ (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) '0' (. (TOK_TABLE_OR_COL src_thrift) lstring) TOK_NULL) 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_thrift 
-          TableScan
-            alias: src_thrift
-            Select Operator
-              expressions:
-                    expr: CASE (lint[0]) WHEN (0) THEN ((lint[0] + 1)) WHEN (1) THEN ((lint[0] + 2)) WHEN (2) THEN (100) ELSE (5) END
-                    type: int
-                    expr: CASE (lstring[0]) WHEN ('0') THEN ('zero') WHEN ('10') THEN (concat(lstring[0], ' is ten')) ELSE ('default') END
-                    type: string
-                    expr: CASE (lstring[0]) WHEN ('0') THEN (lstring) ELSE (null) END[0]
-                    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: 3
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: src_thrift
+          Row Limit Per Split: 3
+          Select Operator
+            expressions:
+                  expr: CASE (lint[0]) WHEN (0) THEN ((lint[0] + 1)) WHEN (1) THEN ((lint[0] + 2)) WHEN (2) THEN (100) ELSE (5) END
+                  type: int
+                  expr: CASE (lstring[0]) WHEN ('0') THEN ('zero') WHEN ('10') THEN (concat(lstring[0], ' is ten')) ELSE ('default') END
+                  type: string
+                  expr: CASE (lstring[0]) WHEN ('0') THEN (lstring) ELSE (null) END[0]
+                  type: string
+            outputColumnNames: _col0, _col1, _col2
+            ListSink
 
 
 PREHOOK: query: SELECT CASE src_thrift.lint[0]
@@ -86,7 +75,7 @@ PREHOOK: query: SELECT CASE src_thrift.l
         WHEN '0' THEN src_thrift.lstring
         ELSE NULL
        END)[0]
-FROM src_thrift LIMIT 3
+FROM src_thrift tablesample (3 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src_thrift
 #### A masked pattern was here ####
@@ -105,7 +94,7 @@ POSTHOOK: query: SELECT CASE src_thrift.
         WHEN '0' THEN src_thrift.lstring
         ELSE NULL
        END)[0]
-FROM src_thrift LIMIT 3
+FROM src_thrift tablesample (3 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src_thrift
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_coalesce.q.out Thu Oct 31 16:00:36 2013
@@ -30,7 +30,7 @@ SELECT COALESCE(1),
        COALESCE(NULL, 2.0, 3.0),
        COALESCE(2.0, NULL, 3.0),
        COALESCE(IF(TRUE, NULL, 0), NULL)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN
 SELECT COALESCE(1),
@@ -51,73 +51,62 @@ SELECT COALESCE(1),
        COALESCE(NULL, 2.0, 3.0),
        COALESCE(2.0, NULL, 3.0),
        COALESCE(IF(TRUE, NULL, 0), NULL)
-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 COALESCE 1)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1 2)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL 2)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1 TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL TOK_NULL 3)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 4 TOK_NULL TOK_NULL TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE '1')) (TOK_SELEXPR (TOK_FUNCTION COALESCE '1' '2')) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL '2')) (TOK_SELEXPR (TOK_FUNCTION COALESCE '1' TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL TOK_NULL '3')) (TOK_SELEXPR (TOK_FUNCTION COALESCE '4' TOK_NULL TOK_NULL TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1.0 2.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL 2.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL 2.0 3.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 2.0 TOK_NULL 3.0)) (TOK
 _SELEXPR (TOK_FUNCTION COALESCE (TOK_FUNCTION IF TRUE TOK_NULL 0) TOK_NULL))) (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 COALESCE 1)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1 2)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL 2)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1 TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL TOK_NULL 3)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 4 TOK_NULL TOK_NULL TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE '1')) (TOK_SELEXPR (TOK_FUNCTION COALESCE '1' '2')) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL '2')) (TOK_SELEXPR (TOK_FUNCTION COALESCE '1' TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL TOK_NULL '3')) (TOK_SELEXPR (TOK_FUNCTION COALESCE '4' TOK_NULL TOK_NULL TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE 1.0 2.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL 2.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE TOK_NULL 2.0 3.0)) (TOK_SELEXPR (TOK_FUN
 CTION COALESCE 2.0 TOK_NULL 3.0)) (TOK_SELEXPR (TOK_FUNCTION COALESCE (TOK_FUNCTION IF TRUE TOK_NULL 0) TOK_NULL)))))
 
 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: COALESCE(1)
-                    type: int
-                    expr: COALESCE(1,2)
-                    type: int
-                    expr: COALESCE(null,2)
-                    type: int
-                    expr: COALESCE(1,null)
-                    type: int
-                    expr: COALESCE(null,null,3)
-                    type: int
-                    expr: COALESCE(4,null,null,null)
-                    type: int
-                    expr: COALESCE('1')
-                    type: string
-                    expr: COALESCE('1','2')
-                    type: string
-                    expr: COALESCE(null,'2')
-                    type: string
-                    expr: COALESCE('1',null)
-                    type: string
-                    expr: COALESCE(null,null,'3')
-                    type: string
-                    expr: COALESCE('4',null,null,null)
-                    type: string
-                    expr: COALESCE(1.0)
-                    type: double
-                    expr: COALESCE(1.0,2.0)
-                    type: double
-                    expr: COALESCE(null,2.0)
-                    type: double
-                    expr: COALESCE(null,2.0,3.0)
-                    type: double
-                    expr: COALESCE(2.0,null,3.0)
-                    type: double
-                    expr: COALESCE(if(true, null, 0),null)
-                    type: int
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
-              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: COALESCE(1)
+                  type: int
+                  expr: COALESCE(1,2)
+                  type: int
+                  expr: COALESCE(null,2)
+                  type: int
+                  expr: COALESCE(1,null)
+                  type: int
+                  expr: COALESCE(null,null,3)
+                  type: int
+                  expr: COALESCE(4,null,null,null)
+                  type: int
+                  expr: COALESCE('1')
+                  type: string
+                  expr: COALESCE('1','2')
+                  type: string
+                  expr: COALESCE(null,'2')
+                  type: string
+                  expr: COALESCE('1',null)
+                  type: string
+                  expr: COALESCE(null,null,'3')
+                  type: string
+                  expr: COALESCE('4',null,null,null)
+                  type: string
+                  expr: COALESCE(1.0)
+                  type: double
+                  expr: COALESCE(1.0,2.0)
+                  type: double
+                  expr: COALESCE(null,2.0)
+                  type: double
+                  expr: COALESCE(null,2.0,3.0)
+                  type: double
+                  expr: COALESCE(2.0,null,3.0)
+                  type: double
+                  expr: COALESCE(if(true, null, 0),null)
+                  type: int
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
+            ListSink
 
 
 PREHOOK: query: SELECT COALESCE(1),
@@ -138,7 +127,7 @@ PREHOOK: query: SELECT COALESCE(1),
        COALESCE(NULL, 2.0, 3.0),
        COALESCE(2.0, NULL, 3.0),
        COALESCE(IF(TRUE, NULL, 0), NULL)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -160,7 +149,7 @@ POSTHOOK: query: SELECT COALESCE(1),
        COALESCE(NULL, 2.0, 3.0),
        COALESCE(2.0, NULL, 3.0),
        COALESCE(IF(TRUE, NULL, 0), NULL)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -181,36 +170,25 @@ 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 COALESCE ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 1) 999)) (TOK_SELEXPR (TOK_FUNCTION COALESCE (. ([ (. (TOK_TABLE_OR_COL src_thrift) lintstring) 0) mystring) '999')) (TOK_SELEXPR (TOK_FUNCTION COALESCE ([ (. (TOK_TABLE_OR_COL src_thrift) mstringstring) 'key_2') '999')))))
 
 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
-            Select Operator
-              expressions:
-                    expr: COALESCE(lint[1],999)
-                    type: int
-                    expr: COALESCE(lintstring[0].mystring,'999')
-                    type: string
-                    expr: COALESCE(mstringstring['key_2'],'999')
-                    type: string
-              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_thrift
+          Select Operator
+            expressions:
+                  expr: COALESCE(lint[1],999)
+                  type: int
+                  expr: COALESCE(lintstring[0].mystring,'999')
+                  type: string
+                  expr: COALESCE(mstringstring['key_2'],'999')
+                  type: string
+            outputColumnNames: _col0, _col1, _col2
+            ListSink
 
 
 PREHOOK: query: SELECT COALESCE(src_thrift.lint[1], 999),

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_concat.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_concat.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_concat.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_concat.q.out Thu Oct 31 16:00:36 2013
@@ -23,7 +23,7 @@ PREHOOK: query: SELECT
   concat(1, 2),
   concat(1),
   concat('1234', 'abc', 'extra argument')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -38,7 +38,7 @@ POSTHOOK: query: SELECT
   concat(1, 2),
   concat(1),
   concat('1234', 'abc', 'extra argument')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -47,7 +47,7 @@ PREHOOK: query: -- binary/mixed
 SELECT
   concat(cast('ab' as binary), cast('cd' as binary)),
   concat('ab', cast('cd' as binary))
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -55,7 +55,7 @@ POSTHOOK: query: -- binary/mixed
 SELECT
   concat(cast('ab' as binary), cast('cd' as binary)),
   concat('ab', cast('cd' as binary))
-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_concat_ws.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_concat_ws.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_concat_ws.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_concat_ws.q.out Thu Oct 31 16:00:36 2013
@@ -46,38 +46,27 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME dest1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION concat_ws (. (TOK_TABLE_OR_COL dest1) c1) (. (TOK_TABLE_OR_COL dest1) c2) (. (TOK_TABLE_OR_COL dest1) c3))) (TOK_SELEXPR (TOK_FUNCTION concat_ws ',' (. (TOK_TABLE_OR_COL dest1) c1) (. (TOK_TABLE_OR_COL dest1) c2) (. (TOK_TABLE_OR_COL dest1) c3))) (TOK_SELEXPR (TOK_FUNCTION concat_ws TOK_NULL (. (TOK_TABLE_OR_COL dest1) c1) (. (TOK_TABLE_OR_COL dest1) c2) (. (TOK_TABLE_OR_COL dest1) c3))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '**' (. (TOK_TABLE_OR_COL dest1) c1) TOK_NULL (. (TOK_TABLE_OR_COL dest1) c3))))))
 
 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:
-        dest1 
-          TableScan
-            alias: dest1
-            Select Operator
-              expressions:
-                    expr: concat_ws(c1, c2, c3)
-                    type: string
-                    expr: concat_ws(',', c1, c2, c3)
-                    type: string
-                    expr: concat_ws(null, c1, c2, c3)
-                    type: string
-                    expr: concat_ws('**', c1, null, c3)
-                    type: string
-              outputColumnNames: _col0, _col1, _col2, _col3
-              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: dest1
+          Select Operator
+            expressions:
+                  expr: concat_ws(c1, c2, c3)
+                  type: string
+                  expr: concat_ws(',', c1, c2, c3)
+                  type: string
+                  expr: concat_ws(null, c1, c2, c3)
+                  type: string
+                  expr: concat_ws('**', c1, null, c3)
+                  type: string
+            outputColumnNames: _col0, _col1, _col2, _col3
+            ListSink
 
 
 PREHOOK: query: SELECT concat_ws(dest1.c1, dest1.c2, dest1.c3),
@@ -106,7 +95,7 @@ SELECT concat_ws('.', array('www', 'face
        concat_ws('_', array('www', 'face'), array('book', 'com', '1234')),
        concat_ws('**', 'www', array('face'), array('book', 'com', '1234')),
        concat_ws('[]', array('www'), 'face', array('book', 'com', '1234')),
-       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 LIMIT 1
+       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: -- evalutes function for array of strings
 EXPLAIN
@@ -116,54 +105,43 @@ SELECT concat_ws('.', array('www', 'face
        concat_ws('_', array('www', 'face'), array('book', 'com', '1234')),
        concat_ws('**', 'www', array('face'), array('book', 'com', '1234')),
        concat_ws('[]', array('www'), 'face', array('book', 'com', '1234')),
-       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 LIMIT 1
+       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: dest1.c1 SIMPLE []
 POSTHOOK: Lineage: dest1.c2 SIMPLE []
 POSTHOOK: Lineage: dest1.c3 SIMPLE []
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME dest1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION concat_ws '.' (TOK_FUNCTION array 'www' 'face' 'book' 'com') '1234')) (TOK_SELEXPR (TOK_FUNCTION concat_ws '-' 'www' (TOK_FUNCTION array 'face' 'book' 'com') '1234')) (TOK_SELEXPR (TOK_FUNCTION concat_ws 'F' 'www' (TOK_FUNCTION array 'face' 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '_' (TOK_FUNCTION array 'www' 'face') (TOK_FUNCTION array 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '**' 'www' (TOK_FUNCTION array 'face') (TOK_FUNCTION array 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '[]' (TOK_FUNCTION array 'www') 'face' (TOK_FUNCTION array 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws 'AAA' (TOK_FUNCTION array 'www') (TOK_FUNCTION array 'face' 'book' 'com') '1234'))) (TOK_LIMIT 1)))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME dest1) (TOK_TABLESPLITSAMPLE TOK_ROWCOUNT 1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION concat_ws '.' (TOK_FUNCTION array 'www' 'face' 'book' 'com') '1234')) (TOK_SELEXPR (TOK_FUNCTION concat_ws '-' 'www' (TOK_FUNCTION array 'face' 'book' 'com') '1234')) (TOK_SELEXPR (TOK_FUNCTION concat_ws 'F' 'www' (TOK_FUNCTION array 'face' 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '_' (TOK_FUNCTION array 'www' 'face') (TOK_FUNCTION array 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '**' 'www' (TOK_FUNCTION array 'face') (TOK_FUNCTION array 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws '[]' (TOK_FUNCTION array 'www') 'face' (TOK_FUNCTION array 'book' 'com' '1234'))) (TOK_SELEXPR (TOK_FUNCTION concat_ws 'AAA' (TOK_FUNCTION array 'www') (TOK_FUNCTION array 'face' 'book' 'com') '1234')))))
 
 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:
-        dest1 
-          TableScan
-            alias: dest1
-            Select Operator
-              expressions:
-                    expr: concat_ws('.', array('www','face','book','com'), '1234')
-                    type: string
-                    expr: concat_ws('-', 'www', array('face','book','com'), '1234')
-                    type: string
-                    expr: concat_ws('F', 'www', array('face','book','com','1234'))
-                    type: string
-                    expr: concat_ws('_', array('www','face'), array('book','com','1234'))
-                    type: string
-                    expr: concat_ws('**', 'www', array('face'), array('book','com','1234'))
-                    type: string
-                    expr: concat_ws('[]', array('www'), 'face', array('book','com','1234'))
-                    type: string
-                    expr: concat_ws('AAA', array('www'), array('face','book','com'), '1234')
-                    type: string
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-              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: dest1
+          Row Limit Per Split: 1
+          Select Operator
+            expressions:
+                  expr: concat_ws('.', array('www','face','book','com'), '1234')
+                  type: string
+                  expr: concat_ws('-', 'www', array('face','book','com'), '1234')
+                  type: string
+                  expr: concat_ws('F', 'www', array('face','book','com','1234'))
+                  type: string
+                  expr: concat_ws('_', array('www','face'), array('book','com','1234'))
+                  type: string
+                  expr: concat_ws('**', 'www', array('face'), array('book','com','1234'))
+                  type: string
+                  expr: concat_ws('[]', array('www'), 'face', array('book','com','1234'))
+                  type: string
+                  expr: concat_ws('AAA', array('www'), array('face','book','com'), '1234')
+                  type: string
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+            ListSink
 
 
 PREHOOK: query: SELECT concat_ws('.', array('www', 'face', 'book', 'com'), '1234'),
@@ -172,7 +150,7 @@ PREHOOK: query: SELECT concat_ws('.', ar
        concat_ws('_', array('www', 'face'), array('book', 'com', '1234')),
        concat_ws('**', 'www', array('face'), array('book', 'com', '1234')),
        concat_ws('[]', array('www'), 'face', array('book', 'com', '1234')),
-       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 LIMIT 1
+       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1
 #### A masked pattern was here ####
@@ -182,7 +160,7 @@ POSTHOOK: query: SELECT concat_ws('.', a
        concat_ws('_', array('www', 'face'), array('book', 'com', '1234')),
        concat_ws('**', 'www', array('face'), array('book', 'com', '1234')),
        concat_ws('[]', array('www'), 'face', array('book', 'com', '1234')),
-       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 LIMIT 1
+       concat_ws('AAA', array('www'), array('face', 'book', 'com'), '1234') FROM dest1 tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
@@ -196,7 +174,7 @@ PREHOOK: query: SELECT concat_ws(NULL, a
        concat_ws(NULL, array('www', 'face'), array('book', 'com', '1234')),
        concat_ws(NULL, 'www', array('face'), array('book', 'com', '1234')),
        concat_ws(NULL, array('www'), 'face', array('book', 'com', '1234')),
-       concat_ws(NULL, array('www'), array('face', 'book', 'com'), '1234') FROM dest1 LIMIT 1
+       concat_ws(NULL, array('www'), array('face', 'book', 'com'), '1234') FROM dest1 tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1
 #### A masked pattern was here ####
@@ -206,7 +184,7 @@ POSTHOOK: query: SELECT concat_ws(NULL, 
        concat_ws(NULL, array('www', 'face'), array('book', 'com', '1234')),
        concat_ws(NULL, 'www', array('face'), array('book', 'com', '1234')),
        concat_ws(NULL, array('www'), 'face', array('book', 'com', '1234')),
-       concat_ws(NULL, array('www'), array('face', 'book', 'com'), '1234') FROM dest1 LIMIT 1
+       concat_ws(NULL, array('www'), array('face', 'book', 'com'), '1234') FROM dest1 tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_conv.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_conv.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_conv.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_conv.q.out Thu Oct 31 16:00:36 2013
@@ -22,7 +22,7 @@ SELECT
   conv('22', 10, 10),
   conv('110011', 2, 16),
   conv('facebook', 36, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -34,7 +34,7 @@ SELECT
   conv('22', 10, 10),
   conv('110011', 2, 16),
   conv('facebook', 36, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -46,7 +46,7 @@ SELECT
   conv('1011', 2, -16),
   conv('-1', 10, 16),
   conv('-15', 10, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -57,7 +57,7 @@ SELECT
   conv('1011', 2, -16),
   conv('-1', 10, 16),
   conv('-15', 10, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -69,7 +69,7 @@ SELECT
   conv('9223372036854775807', 36, -16),
   conv('-9223372036854775807', 36, 16),
   conv('-9223372036854775807', 36, -16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -80,7 +80,7 @@ SELECT
   conv('9223372036854775807', 36, -16),
   conv('-9223372036854775807', 36, 16),
   conv('-9223372036854775807', 36, -16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -93,7 +93,7 @@ SELECT
   conv('131', 1, 5),
   conv('515', 5, 100),
   conv('10', -2, 2)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -105,7 +105,7 @@ SELECT
   conv('131', 1, 5),
   conv('515', 5, 100),
   conv('10', -2, 2)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -116,7 +116,7 @@ SELECT
   conv(4521, 10, 36),
   conv(22, 10, 10),
   conv(110011, 2, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -126,7 +126,7 @@ SELECT
   conv(4521, 10, 36),
   conv(22, 10, 10),
   conv(110011, 2, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -136,7 +136,7 @@ PREHOOK: query: SELECT
   conv(1011, 2, -16),
   conv(-1, 10, 16),
   conv(-15, 10, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -145,7 +145,7 @@ POSTHOOK: query: SELECT
   conv(1011, 2, -16),
   conv(-1, 10, 16),
   conv(-15, 10, 16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -155,7 +155,7 @@ PREHOOK: query: SELECT
   conv(9223372036854775807, 36, -16),
   conv(-9223372036854775807, 36, 16),
   conv(-9223372036854775807, 36, -16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -164,7 +164,7 @@ POSTHOOK: query: SELECT
   conv(9223372036854775807, 36, -16),
   conv(-9223372036854775807, 36, 16),
   conv(-9223372036854775807, 36, -16)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -174,7 +174,7 @@ PREHOOK: query: SELECT
   conv(131, 1, 5),
   conv(515, 5, 100),
   conv('10', -2, 2)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -183,7 +183,7 @@ POSTHOOK: query: SELECT
   conv(131, 1, 5),
   conv(515, 5, 100),
   conv('10', -2, 2)
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -192,7 +192,7 @@ PREHOOK: query: -- Make sure that state 
 
 SELECT conv(key, 10, 16),
        conv(key, 16, 10)
-FROM src LIMIT 3
+FROM src tablesample (3 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -200,7 +200,7 @@ POSTHOOK: query: -- Make sure that state
 
 SELECT conv(key, 10, 16),
        conv(key, 16, 10)
-FROM src LIMIT 3
+FROM src tablesample (3 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_cos.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_cos.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_cos.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_cos.q.out Thu Oct 31 16:00:36 2013
@@ -12,23 +12,23 @@ Example:
    > SELECT cos(0) FROM src LIMIT 1;
   1
 PREHOOK: query: SELECT cos(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 cos(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 cos(0.98), cos(1.57), cos(-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 cos(0.98), cos(1.57), cos(-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_degrees.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_degrees.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_degrees.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_degrees.q.out Thu Oct 31 16:00:36 2013
@@ -1,47 +1,36 @@
-PREHOOK: query: explain 
-select degrees(PI()) FROM src LIMIT 1
+PREHOOK: query: explain
+select degrees(PI()) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain 
-select degrees(PI()) FROM src LIMIT 1
+POSTHOOK: query: explain
+select degrees(PI()) 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 degrees (TOK_FUNCTION PI)))) (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 degrees (TOK_FUNCTION PI))))))
 
 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: degrees(pi())
-                    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: degrees(pi())
+                  type: double
+            outputColumnNames: _col0
+            ListSink
 
 
-PREHOOK: query: select degrees(PI()) FROM src LIMIT 1
+PREHOOK: query: select degrees(PI()) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select degrees(PI()) FROM src LIMIT 1
+POSTHOOK: query: select degrees(PI()) FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -61,49 +50,38 @@ Example:
   -1
 
 PREHOOK: query: explain 
-select degrees(PI()) FROM src LIMIT 1
+select degrees(PI()) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: explain 
-select degrees(PI()) FROM src LIMIT 1
+select degrees(PI()) 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 degrees (TOK_FUNCTION PI)))) (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 degrees (TOK_FUNCTION PI))))))
 
 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: degrees(pi())
-                    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: degrees(pi())
+                  type: double
+            outputColumnNames: _col0
+            ListSink
 
 
-PREHOOK: query: select degrees(PI()) FROM src LIMIT 1
+PREHOOK: query: select degrees(PI()) FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select degrees(PI()) FROM src LIMIT 1
+POSTHOOK: query: select degrees(PI()) 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_div.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_div.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_div.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_div.q.out Thu Oct 31 16:00:36 2013
@@ -11,11 +11,11 @@ a div b - Divide a by b rounded to the l
 Example:
   > SELECT 3 div 2 FROM src LIMIT 1;
   1
-PREHOOK: query: SELECT 3 DIV 2 FROM SRC LIMIT 1
+PREHOOK: query: SELECT 3 DIV 2 FROM SRC tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT 3 DIV 2 FROM SRC LIMIT 1
+POSTHOOK: query: SELECT 3 DIV 2 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_divide.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_divide.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_divide.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_divide.q.out Thu Oct 31 16:00:36 2013
@@ -11,11 +11,11 @@ a / b - Divide a by b
 Example:
   > SELECT 3 / 2 FROM src LIMIT 1;
   1.5
-PREHOOK: query: SELECT 3 / 2 FROM SRC LIMIT 1
+PREHOOK: query: SELECT 3 / 2 FROM SRC tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT 3 / 2 FROM SRC LIMIT 1
+POSTHOOK: query: SELECT 3 / 2 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_elt.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_elt.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_elt.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_elt.q.out Thu Oct 31 16:00:36 2013
@@ -23,7 +23,7 @@ SELECT elt(2, 'abc', 'defg'),
        elt(null, 'abc', 'defg'),
        elt(0, 'abc', 'defg'),
        elt(3, 'abc', 'defg')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN
 SELECT elt(2, 'abc', 'defg'),
@@ -37,59 +37,48 @@ SELECT elt(2, 'abc', 'defg'),
        elt(null, 'abc', 'defg'),
        elt(0, 'abc', 'defg'),
        elt(3, 'abc', 'defg')
-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 elt 2 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 3 'aa' 'bb' 'cc' 'dd' 'ee' 'ff' 'gg')) (TOK_SELEXPR (TOK_FUNCTION elt '1' 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_TINYINT '2'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_SMALLINT '12345'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_BIGINT '123456789012'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_FLOAT 1.25))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_DOUBLE 16.0))) (TOK_SELEXPR (TOK_FUNCTION elt TOK_NULL 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 0 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 3 'abc' 'defg'))) (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 elt 2 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 3 'aa' 'bb' 'cc' 'dd' 'ee' 'ff' 'gg')) (TOK_SELEXPR (TOK_FUNCTION elt '1' 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_TINYINT '2'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_SMALLINT '12345'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_BIGINT '123456789012'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_FLOAT 1.25))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_DOUBLE 16.0))) (TOK_SELEXPR (TOK_FUNCTION elt TOK_NULL 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 0 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 3 'abc' 'defg')))))
 
 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: elt(2, 'abc', 'defg')
-                    type: string
-                    expr: elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg')
-                    type: string
-                    expr: elt('1', 'abc', 'defg')
-                    type: string
-                    expr: elt(2, 'aa', UDFToByte('2'))
-                    type: string
-                    expr: elt(2, 'aa', UDFToShort('12345'))
-                    type: string
-                    expr: elt(2, 'aa', UDFToLong('123456789012'))
-                    type: string
-                    expr: elt(2, 'aa', UDFToFloat(1.25))
-                    type: string
-                    expr: elt(2, 'aa', 16.0)
-                    type: string
-                    expr: elt(null, 'abc', 'defg')
-                    type: string
-                    expr: elt(0, 'abc', 'defg')
-                    type: string
-                    expr: elt(3, 'abc', 'defg')
-                    type: string
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
-              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: elt(2, 'abc', 'defg')
+                  type: string
+                  expr: elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg')
+                  type: string
+                  expr: elt('1', 'abc', 'defg')
+                  type: string
+                  expr: elt(2, 'aa', UDFToByte('2'))
+                  type: string
+                  expr: elt(2, 'aa', UDFToShort('12345'))
+                  type: string
+                  expr: elt(2, 'aa', UDFToLong('123456789012'))
+                  type: string
+                  expr: elt(2, 'aa', UDFToFloat(1.25))
+                  type: string
+                  expr: elt(2, 'aa', 16.0)
+                  type: string
+                  expr: elt(null, 'abc', 'defg')
+                  type: string
+                  expr: elt(0, 'abc', 'defg')
+                  type: string
+                  expr: elt(3, 'abc', 'defg')
+                  type: string
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
+            ListSink
 
 
 PREHOOK: query: SELECT elt(2, 'abc', 'defg'),
@@ -103,7 +92,7 @@ PREHOOK: query: SELECT elt(2, 'abc', 'de
        elt(null, 'abc', 'defg'),
        elt(0, 'abc', 'defg'),
        elt(3, 'abc', 'defg')
-FROM src LIMIT 1
+FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -118,7 +107,7 @@ POSTHOOK: query: SELECT elt(2, 'abc', 'd
        elt(null, 'abc', 'defg'),
        elt(0, 'abc', 'defg'),
        elt(3, 'abc', 'defg')
-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_equal.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_equal.q.out?rev=1537540&r1=1537539&r2=1537540&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_equal.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_equal.q.out Thu Oct 31 16:00:36 2013
@@ -20,11 +20,11 @@ POSTHOOK: query: DESCRIBE FUNCTION EXTEN
 POSTHOOK: type: DESCFUNCTION
 a == b - Returns TRUE if a equals b and false otherwise
 Synonyms: =
-PREHOOK: query: SELECT true=false, false=true, false=false, true=true, NULL=NULL, true=NULL, NULL=true, false=NULL, NULL=false FROM src LIMIT 1
+PREHOOK: query: SELECT true=false, false=true, false=false, true=true, NULL=NULL, true=NULL, NULL=true, false=NULL, NULL=false FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT true=false, false=true, false=false, true=true, NULL=NULL, true=NULL, NULL=true, false=NULL, NULL=false FROM src LIMIT 1
+POSTHOOK: query: SELECT true=false, false=true, false=false, true=true, NULL=NULL, true=NULL, NULL=true, false=NULL, NULL=false FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -39,11 +39,11 @@ PREHOOK: type: DESCFUNCTION
 POSTHOOK: query: DESCRIBE FUNCTION EXTENDED <=>
 POSTHOOK: type: DESCFUNCTION
 a <=> b - Returns same result with EQUAL(=) operator for non-null operands, but returns TRUE if both are NULL, FALSE if one of the them is NULL
-PREHOOK: query: SELECT true<=>false, false<=>true, false<=>false, true<=>true, NULL<=>NULL, true<=>NULL, NULL<=>true, false<=>NULL, NULL<=>false FROM src LIMIT 1
+PREHOOK: query: SELECT true<=>false, false<=>true, false<=>false, true<=>true, NULL<=>NULL, true<=>NULL, NULL<=>true, false<=>NULL, NULL<=>false FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT true<=>false, false<=>true, false<=>false, true<=>true, NULL<=>NULL, true<=>NULL, NULL<=>true, false<=>NULL, NULL<=>false FROM src LIMIT 1
+POSTHOOK: query: SELECT true<=>false, false<=>true, false<=>false, true<=>true, NULL<=>NULL, true<=>NULL, NULL<=>true, false<=>NULL, NULL<=>false FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####



Mime
View raw message