hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1236489 [7/7] - in /hive/trunk/ql/src/test: queries/clientpositive/ results/clientpositive/
Date Fri, 27 Jan 2012 01:41:37 GMT
Modified: hive/trunk/ql/src/test/results/clientpositive/rcfile_columnar.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/rcfile_columnar.q.out?rev=1236489&r1=1236488&r2=1236489&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/rcfile_columnar.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/rcfile_columnar.q.out Fri Jan 27 01:41:35
2012
@@ -33,23 +33,23 @@ POSTHOOK: Lineage: columntable.key SIMPL
 POSTHOOK: Lineage: columntable.value SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
 key	string	
 value	string	
-PREHOOK: query: SELECT columnTable.* FROM columnTable
+PREHOOK: query: SELECT columnTable.* FROM columnTable ORDER BY key ASC, value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@columntable
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT columnTable.* FROM columnTable
+POSTHOOK: query: SELECT columnTable.* FROM columnTable ORDER BY key ASC, value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@columntable
 #### A masked pattern was here ####
 POSTHOOK: Lineage: columntable.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default),
]
 POSTHOOK: Lineage: columntable.value SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
-238	val_238
-86	val_86
-311	val_311
-27	val_27
 165	val_165
-409	val_409
+238	val_238
 255	val_255
+27	val_27
 278	val_278
-98	val_98
+311	val_311
+409	val_409
 484	val_484
+86	val_86
+98	val_98

Modified: hive/trunk/ql/src/test/results/clientpositive/rcfile_lazydecompress.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/rcfile_lazydecompress.q.out?rev=1236489&r1=1236488&r2=1236489&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/rcfile_lazydecompress.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/rcfile_lazydecompress.q.out Fri Jan 27 01:41:35
2012
@@ -15,39 +15,39 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@rcfiletablelazydecompress
 POSTHOOK: Lineage: rcfiletablelazydecompress.key SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
-PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238
+PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 ORDER
BY key ASC, value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238
+POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 ORDER
BY key ASC, value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
 POSTHOOK: Lineage: rcfiletablelazydecompress.key SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
-311	val_311
-409	val_409
 255	val_255
 278	val_278
+311	val_311
+409	val_409
 484	val_484
-PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and key
< 400
+PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and key
< 400 ORDER BY key ASC, value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and
key < 400
+POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and
key < 400 ORDER BY key ASC, value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
 POSTHOOK: Lineage: rcfiletablelazydecompress.key SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
-311	val_311
 255	val_255
 278	val_278
-PREHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key
+311	val_311
+PREHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key ORDER BY key ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key
+POSTHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key ORDER BY key ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
@@ -72,11 +72,11 @@ POSTHOOK: Lineage: rcfiletablelazydecomp
 POSTHOOK: Lineage: rcfiletablelazydecompress.key SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
-PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238
+PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 ORDER
BY key ASC, value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238
+POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 ORDER
BY key ASC, value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
@@ -84,16 +84,16 @@ POSTHOOK: Lineage: rcfiletablelazydecomp
 POSTHOOK: Lineage: rcfiletablelazydecompress.key SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
-311	val_311
-409	val_409
 255	val_255
 278	val_278
+311	val_311
+409	val_409
 484	val_484
-PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and key
< 400
+PREHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and key
< 400 ORDER BY key ASC, value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and
key < 400
+POSTHOOK: query: SELECT key, value FROM rcfileTableLazyDecompress where key > 238 and
key < 400 ORDER BY key ASC, value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
@@ -101,14 +101,14 @@ POSTHOOK: Lineage: rcfiletablelazydecomp
 POSTHOOK: Lineage: rcfiletablelazydecompress.key SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
 POSTHOOK: Lineage: rcfiletablelazydecompress.value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
-311	val_311
 255	val_255
 278	val_278
-PREHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key
+311	val_311
+PREHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key ORDER BY key ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key
+POSTHOOK: query: SELECT key, count(1) FROM rcfileTableLazyDecompress where key > 238 group
by key ORDER BY key ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfiletablelazydecompress
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/rcfile_union.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/rcfile_union.q.out?rev=1236489&r1=1236488&r2=1236489&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/rcfile_union.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/rcfile_union.q.out Fri Jan 27 01:41:35 2012
@@ -24,36 +24,36 @@ POSTHOOK: Lineage: rcfile_uniontable.c S
 PREHOOK: query: SELECT * FROM (
 SELECT b AS cola FROM rcfile_unionTable
 UNION ALL
-SELECT c AS cola FROM rcfile_unionTable) s
+SELECT c AS cola FROM rcfile_unionTable) s ORDER BY cola ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rcfile_uniontable
 #### A masked pattern was here ####
 POSTHOOK: query: SELECT * FROM (
 SELECT b AS cola FROM rcfile_unionTable
 UNION ALL
-SELECT c AS cola FROM rcfile_unionTable) s
+SELECT c AS cola FROM rcfile_unionTable) s ORDER BY cola ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rcfile_uniontable
 #### A masked pattern was here ####
 POSTHOOK: Lineage: rcfile_uniontable.b SIMPLE [(src)src.FieldSchema(name:key, type:string,
comment:default), ]
 POSTHOOK: Lineage: rcfile_uniontable.c SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
-val_238
+165
 238
-val_86
-86
-val_311
-311
-val_27
+255
 27
-val_165
-165
-val_409
+278
+311
 409
+484
+86
+98
+val_165
+val_238
 val_255
-255
+val_27
 val_278
-278
-val_98
-98
+val_311
+val_409
 val_484
-484
+val_86
+val_98

Modified: hive/trunk/ql/src/test/results/clientpositive/sample10.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/sample10.q.out?rev=1236489&r1=1236488&r2=1236489&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/sample10.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/sample10.q.out Fri Jan 27 01:41:35 2012
@@ -33,10 +33,10 @@ POSTHOOK: Lineage: srcpartbucket PARTITI
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key,
type:string, comment:default), ]
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value,
type:string, comment:default), ]
 PREHOOK: query: explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is
not null group by ds
+select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is
not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is
not null group by ds
+select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is
not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key,
type:string, comment:default), ]
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value,
type:string, comment:default), ]
@@ -47,10 +47,11 @@ POSTHOOK: Lineage: srcpartbucket PARTITI
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key,
type:string, comment:default), ]
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value,
type:string, comment:default), ]
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME srcpartbucket) (TOK_TABLEBUCKETSAMPLE 1 4
(TOK_TABLE_OR_COL key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (TOK_TABLE_OR_COL ds)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (TOK_FUNCTION
TOK_ISNOTNULL (TOK_TABLE_OR_COL ds))) (TOK_GROUPBY (TOK_TABLE_OR_COL ds))))
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME srcpartbucket) (TOK_TABLEBUCKETSAMPLE 1 4
(TOK_TABLE_OR_COL key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (TOK_TABLE_OR_COL ds)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (TOK_FUNCTION
TOK_ISNOTNULL (TOK_TABLE_OR_COL ds))) (TOK_GROUPBY (TOK_TABLE_OR_COL ds)) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC
(TOK_TABLE_OR_COL ds)))))
 
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -314,32 +315,85 @@ STAGE PLANS:
               GlobalTableId: 0
 #### A masked pattern was here ####
               NumFilesPerFileSink: 1
-#### A masked pattern was here ####
               table:
-                  input format: org.apache.hadoop.mapred.TextInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                   properties:
                     columns _col0,_col1
-                    columns.types string:bigint
+                    columns.types string,bigint
                     escape.delim \
-                    serialization.format 1
               TotalFiles: 1
               GatherStats: false
               MultiFileSpray: false
 
+  Stage: Stage-2
+    Map Reduce
+      Alias -> Map Operator Tree:
+#### A masked pattern was here ####
+            Reduce Output Operator
+              key expressions:
+                    expr: _col0
+                    type: string
+              sort order: +
+              tag: -1
+              value expressions:
+                    expr: _col0
+                    type: string
+                    expr: _col1
+                    type: bigint
+      Needs Tagging: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: -mr-10002
+            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+            properties:
+              columns _col0,_col1
+              columns.types string,bigint
+              escape.delim \
+          
+              input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+              output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+              properties:
+                columns _col0,_col1
+                columns.types string,bigint
+                escape.delim \
+      Reduce Operator Tree:
+        Extract
+          File Output Operator
+            compressed: false
+            GlobalTableId: 0
+#### A masked pattern was here ####
+            NumFilesPerFileSink: 1
+#### A masked pattern was here ####
+            table:
+                input format: org.apache.hadoop.mapred.TextInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                properties:
+                  columns _col0,_col1
+                  columns.types string:bigint
+                  escape.delim \
+                  serialization.format 1
+            TotalFiles: 1
+            GatherStats: false
+            MultiFileSpray: false
+
   Stage: Stage-0
     Fetch Operator
       limit: -1
 
 
-PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on
key) where ds is not null group by ds
+PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on
key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on
key) where ds is not null group by ds
+POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on
key) where ds is not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
@@ -356,14 +410,14 @@ POSTHOOK: Lineage: srcpartbucket PARTITI
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value,
type:string, comment:default), ]
 2008-04-08	10
 2008-04-09	10
-PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on
key) where ds is not null group by ds
+PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on
key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on
key) where ds is not null group by ds
+POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on
key) where ds is not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
@@ -380,14 +434,14 @@ POSTHOOK: Lineage: srcpartbucket PARTITI
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value,
type:string, comment:default), ]
 2008-04-08	12
 2008-04-09	12
-PREHOOK: query: select * from srcpartbucket where ds is not null
+PREHOOK: query: select * from srcpartbucket where ds is not null ORDER BY key ASC, value
ASC, ds ASC, hr ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: select * from srcpartbucket where ds is not null
+POSTHOOK: query: select * from srcpartbucket where ds is not null ORDER BY key ASC, value
ASC, ds ASC, hr ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
@@ -403,42 +457,42 @@ POSTHOOK: Lineage: srcpartbucket PARTITI
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key,
type:string, comment:default), ]
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value,
type:string, comment:default), ]
 0	val_0	2008-04-08	11
-4	val_4	2008-04-08	11
-8	val_8	2008-04-08	11
 0	val_0	2008-04-08	11
 0	val_0	2008-04-08	11
-5	val_5	2008-04-08	11
-5	val_5	2008-04-08	11
-2	val_2	2008-04-08	11
-5	val_5	2008-04-08	11
-9	val_9	2008-04-08	11
 0	val_0	2008-04-08	12
-4	val_4	2008-04-08	12
-8	val_8	2008-04-08	12
 0	val_0	2008-04-08	12
 0	val_0	2008-04-08	12
-5	val_5	2008-04-08	12
-5	val_5	2008-04-08	12
-2	val_2	2008-04-08	12
-5	val_5	2008-04-08	12
-9	val_9	2008-04-08	12
 0	val_0	2008-04-09	11
-4	val_4	2008-04-09	11
-8	val_8	2008-04-09	11
 0	val_0	2008-04-09	11
 0	val_0	2008-04-09	11
-5	val_5	2008-04-09	11
-5	val_5	2008-04-09	11
-2	val_2	2008-04-09	11
-5	val_5	2008-04-09	11
-9	val_9	2008-04-09	11
 0	val_0	2008-04-09	12
-4	val_4	2008-04-09	12
-8	val_8	2008-04-09	12
 0	val_0	2008-04-09	12
 0	val_0	2008-04-09	12
+2	val_2	2008-04-08	11
+2	val_2	2008-04-08	12
+2	val_2	2008-04-09	11
+2	val_2	2008-04-09	12
+4	val_4	2008-04-08	11
+4	val_4	2008-04-08	12
+4	val_4	2008-04-09	11
+4	val_4	2008-04-09	12
+5	val_5	2008-04-08	11
+5	val_5	2008-04-08	11
+5	val_5	2008-04-08	11
+5	val_5	2008-04-08	12
+5	val_5	2008-04-08	12
+5	val_5	2008-04-08	12
+5	val_5	2008-04-09	11
+5	val_5	2008-04-09	11
+5	val_5	2008-04-09	11
 5	val_5	2008-04-09	12
 5	val_5	2008-04-09	12
-2	val_2	2008-04-09	12
 5	val_5	2008-04-09	12
+8	val_8	2008-04-08	11
+8	val_8	2008-04-08	12
+8	val_8	2008-04-09	11
+8	val_8	2008-04-09	12
+9	val_9	2008-04-08	11
+9	val_9	2008-04-08	12
+9	val_9	2008-04-09	11
 9	val_9	2008-04-09	12

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_sentences.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_sentences.q.out?rev=1236489&r1=1236488&r2=1236489&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_sentences.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_sentences.q.out Fri Jan 27 01:41:35
2012
@@ -31,66 +31,66 @@ POSTHOOK: Input: default@sent_tmp
 POSTHOOK: Output: default@sent_tmp2
 POSTHOOK: Lineage: sent_tmp.val SCRIPT []
 POSTHOOK: Lineage: sent_tmp2.val SCRIPT [(sent_tmp)sent_tmp.FieldSchema(name:val, type:array<string>,
comment:null), ]
-PREHOOK: query: SELECT hex(val) FROM sent_tmp2
+PREHOOK: query: SELECT hex(val) AS value FROM sent_tmp2 ORDER BY value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@sent_tmp2
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT hex(val) FROM sent_tmp2
+POSTHOOK: query: SELECT hex(val) AS value FROM sent_tmp2 ORDER BY value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@sent_tmp2
 #### A masked pattern was here ####
 POSTHOOK: Lineage: sent_tmp.val SCRIPT []
 POSTHOOK: Lineage: sent_tmp2.val SCRIPT [(sent_tmp)sent_tmp.FieldSchema(name:val, type:array<string>,
comment:null), ]
 48697665
-657374
-756E
-657863656C6C656E74
-6F7574696C
-706F7572
-6C6573
-72657175C3AA746573
+48697665
+554446
+6175746F6D617469717565
+6175746F6D617469717565
+6365
+636F6E667573696F6E
+6465
 6465
+646573
 646F6E6EC3A96573
+646F6E6EC3A96573
+656E636F7265
+657374
+657374
 6574
-706575742DC3AA747265
-706C7573
-706F6C7976616C656E74
-717565
+6574
+6574
+657863656C6C656E74
+657863656C6C656E74
+666F6E6374696F6E6E65
+666F726DC3A96573
 6C61
-74726164756374696F6E
-6175746F6D617469717565
 6C61
-706F6E6374756174696F6E
-6D756C7469706C6573
-646573
-70687261736573
+6C61
+6C6573
+6C6573
 6D616C
-666F726DC3A96573
-636F6E667573696F6E
-6574
-706F757274616E74
-6365
-554446
-666F6E6374696F6E6E65
-656E636F7265
-48697665
-657374
-756E
-657863656C6C656E74
+6D756C7469706C6573
 6F7574696C
-706F7572
-6C6573
-72657175C3AA746573
-6465
-646F6E6EC3A96573
-6574
+6F7574696C
+706575742DC3AA747265
 706575742DC3AA747265
+70687261736573
+706C7573
 706C7573
 706F6C7976616C656E74
+706F6C7976616C656E74
+706F6E6374756174696F6E
+706F7572
+706F7572
+706F757274616E74
 717565
-6C61
+717565
+72657175C3AA746573
+72657175C3AA746573
 74726164756374696F6E
-6175746F6D617469717565
+74726164756374696F6E
+756E
+756E
 PREHOOK: query: DROP TABLE sent_tmp
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@sent_tmp
@@ -152,11 +152,11 @@ POSTHOOK: Lineage: sent_tmp.val SCRIPT [
 POSTHOOK: Lineage: sent_tmp.val SCRIPT []
 POSTHOOK: Lineage: sent_tmp2.val SCRIPT [(sent_tmp)sent_tmp.FieldSchema(name:val, type:array<string>,
comment:null), ]
 POSTHOOK: Lineage: sent_tmp2.val SCRIPT [(sent_tmp)sent_tmp.FieldSchema(name:val, type:array<string>,
comment:null), ]
-PREHOOK: query: SELECT hex(val) FROM sent_tmp2
+PREHOOK: query: SELECT hex(val) AS value FROM sent_tmp2 ORDER BY value ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@sent_tmp2
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT hex(val) FROM sent_tmp2
+POSTHOOK: query: SELECT hex(val) AS value FROM sent_tmp2 ORDER BY value ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@sent_tmp2
 #### A masked pattern was here ####
@@ -164,42 +164,42 @@ POSTHOOK: Lineage: sent_tmp.val SCRIPT [
 POSTHOOK: Lineage: sent_tmp.val SCRIPT []
 POSTHOOK: Lineage: sent_tmp2.val SCRIPT [(sent_tmp)sent_tmp.FieldSchema(name:val, type:array<string>,
comment:null), ]
 POSTHOOK: Lineage: sent_tmp2.val SCRIPT [(sent_tmp)sent_tmp.FieldSchema(name:val, type:array<string>,
comment:null), ]
-48697665
-697374
-65696E
-61757367657A656963686E65746573
-5765726B7A657567
-66C3BC72
-646965
 41626672616765
-766F6E
 446174656E
-756E64
-7669656C6C6569636874
-7669656C7365697469676572
-616C73
-646965
-6D61736368696E656C6C65
-C39C6265727365747A756E67
+48697665
+496E74657270756E6B74696F6E
 4D756C7469706C65
-7363686C65636874
-676562696C646574656E
 53C3A4747A65
+554446
 5665727765636873656C756E67
-496E74657270756E6B74696F6E
-756E64
-646F6368
-697374
+5765726B7A657567
+616C73
+61757367657A656963686E65746573
+646965
+646965
 6469657365
-554446
+646F6368
+65696E
 66756E6B74696F6E69657274
+66C3BC72
+676562696C646574656E
 696D6D6572
+697374
+697374
+6D61736368696E656C6C65
 6E6F6368
-PREHOOK: query: SELECT sentences("Hive is an excellent tool for data querying; and perhaps
more versatile than machine translation!! Multiple, ill-formed sentences...confounding punctuation--and
yet this UDF still works!!!!") FROM src LIMIT 1
+7363686C65636874
+756E64
+756E64
+7669656C6C6569636874
+7669656C7365697469676572
+766F6E
+C39C6265727365747A756E67
+PREHOOK: query: SELECT sentences("Hive is an excellent tool for data querying; and perhaps
more versatile than machine translation!! Multiple, ill-formed sentences...confounding punctuation--and
yet this UDF still works!!!!") AS value FROM src ORDER BY value ASC LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT sentences("Hive is an excellent tool for data querying; and perhaps
more versatile than machine translation!! Multiple, ill-formed sentences...confounding punctuation--and
yet this UDF still works!!!!") FROM src LIMIT 1
+POSTHOOK: query: SELECT sentences("Hive is an excellent tool for data querying; and perhaps
more versatile than machine translation!! Multiple, ill-formed sentences...confounding punctuation--and
yet this UDF still works!!!!") AS value FROM src ORDER BY value ASC LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/union24.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union24.q.out?rev=1236489&r1=1236488&r2=1236489&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/union24.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/union24.q.out Fri Jan 27 01:41:35 2012
@@ -36,7 +36,7 @@ select s.key, s.count from (
   union all
   select key, count(1) as count from src5 where key < 10 group by key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
 select s.key, s.count from (
@@ -48,10 +48,10 @@ select s.key, s.count from (
   union all
   select key, count(1) as count from src5 where key < 10 group by key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM
(TOK_TABREF (TOK_TABNAME src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (<
(TOK_TABLE_OR_COL key) 10)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src3))) (TOK_INSERT
(TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key))
(TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY
(TOK_FROM (TOK_TABREF (TOK_TABNAME src4))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE))
(TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE
(< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src5)))
(TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL
key)) (TOK_SELEXPR (TOK_FUNCTION count 1) count
 )) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10)) (TOK_GROUPBY (TOK_TABLE_OR_COL key))))) s))
(TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL
s) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) count))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC
(. (TOK_TABLE_OR_COL s) key)))))
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM
(TOK_TABREF (TOK_TABNAME src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (<
(TOK_TABLE_OR_COL key) 10)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src3))) (TOK_INSERT
(TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key))
(TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY
(TOK_FROM (TOK_TABREF (TOK_TABNAME src4))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE))
(TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE
(< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src5)))
(TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL
key)) (TOK_SELEXPR (TOK_FUNCTION count 1) count
 )) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10)) (TOK_GROUPBY (TOK_TABLE_OR_COL key))))) s))
(TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL
s) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) count))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC
(. (TOK_TABLE_OR_COL s) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL s) count)))))
 
 STAGE DEPENDENCIES:
   Stage-3 is a root stage
@@ -194,7 +194,9 @@ STAGE PLANS:
                   key expressions:
                         expr: _col0
                         type: string
-                  sort order: +
+                        expr: _col1
+                        type: bigint
+                  sort order: ++
                   tag: -1
                   value expressions:
                         expr: _col0
@@ -229,7 +231,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -264,7 +268,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -299,7 +305,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -486,7 +494,7 @@ PREHOOK: query: select s.key, s.count fr
   union all
   select key, count(1) as count from src5 where key < 10 group by key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src2
 PREHOOK: Input: default@src3
@@ -502,17 +510,17 @@ POSTHOOK: query: select s.key, s.count f
   union all
   select key, count(1) as count from src5 where key < 10 group by key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src2
 POSTHOOK: Input: default@src3
 POSTHOOK: Input: default@src4
 POSTHOOK: Input: default@src5
 #### A masked pattern was here ####
-0	3
 0	1
 0	3
 0	3
+0	3
 2	1
 2	1
 2	1
@@ -521,10 +529,10 @@ POSTHOOK: Input: default@src5
 4	1
 4	1
 4	1
-5	3
 5	1
 5	3
 5	3
+5	3
 8	1
 8	1
 8	1
@@ -541,7 +549,7 @@ select s.key, s.count from (
   union all
   select a.key as key, b.count as count from src4 a join src5 b on a.key=b.key where a.key
< 10
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
 select s.key, s.count from (
@@ -551,10 +559,10 @@ select s.key, s.count from (
   union all
   select a.key as key, b.count as count from src4 a join src5 b on a.key=b.key where a.key
< 10
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF
(TOK_TABNAME src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR
(TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (< (TOK_TABLE_OR_COL
key) 10)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src3))) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL
count))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF
(TOK_TABNAME src4) a) (TOK_TABREF (TOK_TABNAME src5) b) (= (. (TOK_TABLE_OR_COL a) key) (.
(TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) count)
count)) (TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 10))))) s)) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (T
 OK_SELEXPR (. (TOK_TABLE_OR_COL s) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) count))) (TOK_ORDERBY
(TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL s) key)))))
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF
(TOK_TABNAME src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR
(TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (< (TOK_TABLE_OR_COL
key) 10)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src3))) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL
count))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF
(TOK_TABNAME src4) a) (TOK_TABREF (TOK_TABNAME src5) b) (= (. (TOK_TABLE_OR_COL a) key) (.
(TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) count)
count)) (TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 10))))) s)) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (T
 OK_SELEXPR (. (TOK_TABLE_OR_COL s) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) count))) (TOK_ORDERBY
(TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL s) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL
s) count)))))
 
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -745,7 +753,9 @@ STAGE PLANS:
                   key expressions:
                         expr: _col0
                         type: string
-                  sort order: +
+                        expr: _col1
+                        type: bigint
+                  sort order: ++
                   tag: -1
                   value expressions:
                         expr: _col0
@@ -780,7 +790,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -815,7 +827,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -958,7 +972,7 @@ PREHOOK: query: select s.key, s.count fr
   union all
   select a.key as key, b.count as count from src4 a join src5 b on a.key=b.key where a.key
< 10
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src2
 PREHOOK: Input: default@src3
@@ -972,7 +986,7 @@ POSTHOOK: query: select s.key, s.count f
   union all
   select a.key as key, b.count as count from src4 a join src5 b on a.key=b.key where a.key
< 10
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src2
 POSTHOOK: Input: default@src3
@@ -1005,7 +1019,7 @@ select s.key, s.count from (
   union all
   select a.key as key, count(1) as count from src4 a join src5 b on a.key=b.key where a.key
< 10 group by a.key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
 select s.key, s.count from (
@@ -1015,10 +1029,10 @@ select s.key, s.count from (
   union all
   select a.key as key, count(1) as count from src4 a join src5 b on a.key=b.key where a.key
< 10 group by a.key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF
(TOK_TABNAME src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR
(TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (< (TOK_TABLE_OR_COL
key) 10)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src3))) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL
count))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF
(TOK_TABNAME src4) a) (TOK_TABREF (TOK_TABNAME src5) b) (= (. (TOK_TABLE_OR_COL a) key) (.
(TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (TOK_FUNCTION count 1) count))
(TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 10)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL a) key)))))
s)) (TOK_INSERT (TOK_DESTINATION (TO
 K_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) key)) (TOK_SELEXPR
(. (TOK_TABLE_OR_COL s) count))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL
s) key)))))
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF
(TOK_TABNAME src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR
(TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL count))) (TOK_WHERE (< (TOK_TABLE_OR_COL
key) 10)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src3))) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL
count))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 10))))) (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF
(TOK_TABNAME src4) a) (TOK_TABREF (TOK_TABNAME src5) b) (= (. (TOK_TABLE_OR_COL a) key) (.
(TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT
(TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (TOK_FUNCTION count 1) count))
(TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 10)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL a) key)))))
s)) (TOK_INSERT (TOK_DESTINATION (TO
 K_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) key)) (TOK_SELEXPR
(. (TOK_TABLE_OR_COL s) count))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL
s) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL s) count)))))
 
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -1283,7 +1297,9 @@ STAGE PLANS:
                   key expressions:
                         expr: _col0
                         type: string
-                  sort order: +
+                        expr: _col1
+                        type: bigint
+                  sort order: ++
                   tag: -1
                   value expressions:
                         expr: _col0
@@ -1318,7 +1334,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -1353,7 +1371,9 @@ STAGE PLANS:
                       key expressions:
                             expr: _col0
                             type: string
-                      sort order: +
+                            expr: _col1
+                            type: bigint
+                      sort order: ++
                       tag: -1
                       value expressions:
                             expr: _col0
@@ -1496,7 +1516,7 @@ PREHOOK: query: select s.key, s.count fr
   union all
   select a.key as key, count(1) as count from src4 a join src5 b on a.key=b.key where a.key
< 10 group by a.key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src2
 PREHOOK: Input: default@src3
@@ -1510,7 +1530,7 @@ POSTHOOK: query: select s.key, s.count f
   union all
   select a.key as key, count(1) as count from src4 a join src5 b on a.key=b.key where a.key
< 10 group by a.key
 )s
-order by s.key
+order by s.key ASC, s.count ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src2
 POSTHOOK: Input: default@src3



Mime
View raw message