hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pras...@apache.org
Subject svn commit: r771990 [5/8] - in /hadoop/hive/trunk: ./ common/src/java/org/apache/hadoop/hive/conf/ conf/ data/conf/ hwi/ jdbc/ ql/src/java/org/apache/hadoop/hive/ql/ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ ql/src/java/org/apache/hadoop/hive/ql...
Date Tue, 05 May 2009 22:17:50 GMT
Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/join5.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/join5.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/join5.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/join5.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,18 @@
+query: CREATE TABLE dest1(c1 INT, c2 STRING, c3 INT, c4 STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ RIGHT OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3)
  (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4)))))
 
@@ -116,6 +131,24 @@
                 name: dest1
 
 
+query: FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ RIGHT OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/229545052/1184877063.10000
 17	val_17	17	val_17
 18	val_18	18	val_18
 18	val_18	18	val_18

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/join6.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/join6.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/join6.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/join6.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,18 @@
+query: CREATE TABLE dest1(c1 INT, c2 STRING, c3 INT, c4 STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ FULL OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_FULLOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3) 
 (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4)))))
 
@@ -116,6 +131,24 @@
                 name: dest1
 
 
+query: FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ FULL OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/674683169/66863860.10000
 11	val_11	NULL	NULL
 12	val_12	NULL	NULL
 12	val_12	NULL	NULL

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/join7.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/join7.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/join7.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/join7.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,23 @@
+query: CREATE TABLE dest1(c1 INT, c2 STRING, c3 INT, c4 STRING, c5 INT, c6 STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ FULL OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ LEFT OUTER JOIN 
+ (
+  FROM src src3 SELECT src3.key AS c5, src3.value AS c6 WHERE src3.key > 20 and src3.key < 25
+ ) c
+ ON (a.c1 = c.c5)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4, c.c5 AS c5, c.c6 AS c6
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4, c.c5, c.c6
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_FULLOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src3)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) key) c5) (TOK_SELEX
 PR (. (TOK_TABLE_OR_COL src3) value) c6)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src3) key) 20) (< (. (TOK_TABLE_OR_COL src3) key) 25))))) c) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL c) c5)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c5) c5) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c6) c6)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c5)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c6)))))
 
@@ -155,6 +175,29 @@
                 name: dest1
 
 
+query: FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ FULL OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ LEFT OUTER JOIN 
+ (
+  FROM src src3 SELECT src3.key AS c5, src3.value AS c6 WHERE src3.key > 20 and src3.key < 25
+ ) c
+ ON (a.c1 = c.c5)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4, c.c5 AS c5, c.c6 AS c6
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4, c.c5, c.c6
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/934204295/128575675.10000
 11	val_11	NULL	NULL	NULL	NULL
 12	val_12	NULL	NULL	NULL	NULL
 12	val_12	NULL	NULL	NULL	NULL

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/join8.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/join8.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/join8.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/join8.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,18 @@
+query: CREATE TABLE dest1(c1 INT, c2 STRING, c3 INT, c4 STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ LEFT OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4 where c.c3 IS NULL AND c.c1 IS NOT NULL
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3) 
 (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4))) (TOK_WHERE (AND (TOK_FUNCTION TOK_ISNULL (. (TOK_TABLE_OR_COL c) c3)) (TOK_FUNCTION TOK_ISNOTNULL (. (TOK_TABLE_OR_COL c) c1))))))
 
@@ -120,6 +135,24 @@
                 name: dest1
 
 
+query: FROM (
+ FROM 
+  (
+  FROM src src1 SELECT src1.key AS c1, src1.value AS c2 WHERE src1.key > 10 and src1.key < 20
+  ) a
+ LEFT OUTER JOIN 
+ (
+  FROM src src2 SELECT src2.key AS c3, src2.value AS c4 WHERE src2.key > 15 and src2.key < 25
+ ) b 
+ ON (a.c1 = b.c3)
+ SELECT a.c1 AS c1, a.c2 AS c2, b.c3 AS c3, b.c4 AS c4
+) c
+INSERT OVERWRITE TABLE dest1 SELECT c.c1, c.c2, c.c3, c.c4 where c.c3 IS NULL AND c.c1 IS NOT NULL
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/106779552/293157937.10000
 11	val_11	NULL	NULL
 12	val_12	NULL	NULL
 12	val_12	NULL	NULL

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/join9.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/join9.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/join9.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/join9.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,7 @@
+query: CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN EXTENDED
+FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key)
+INSERT OVERWRITE TABLE dest1 SELECT src1.key, src2.value where src1.ds = '2008-04-08' and src1.hr = '12'
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF srcpart src1) (TOK_TABREF src src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value))) (TOK_WHERE (and (= (. (TOK_TABLE_OR_COL src1) ds) '2008-04-08') (= (. (TOK_TABLE_OR_COL src1) hr) '12')))))
 
@@ -51,10 +55,10 @@
                       type: string
       Needs Tagging: true
       Path -> Alias:
-        file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/src 
-        file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08 
+        file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/src 
+        file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=12 
       Path -> Partition:
-        file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/src 
+        file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/src 
           Partition
           
               input format: org.apache.hadoop.mapred.TextInputFormat
@@ -69,10 +73,10 @@
                 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                 file.inputformat org.apache.hadoop.mapred.TextInputFormat
                 file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                location file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/src
+                location file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/src
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: src
-        file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08 
+        file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=12 
           Partition
             partition values:
               ds 2008-04-08
@@ -91,7 +95,7 @@
                 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                 file.inputformat org.apache.hadoop.mapred.TextInputFormat
                 file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                location file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/srcpart
+                location file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/srcpart
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: srcpart
       Reduce Operator Tree:
@@ -120,7 +124,7 @@
                 File Output Operator
                   compressed: false
                   GlobalTableId: 1
-                  directory: /data/users/zshao/tools/416-trunk-apache-hive/ql/../build/ql/tmp/795506225.10000.insclause-0
+                  directory: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/93836917.10000.insclause-0
                   table:
                       input format: org.apache.hadoop.mapred.TextInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -134,7 +138,7 @@
                         serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                         file.inputformat org.apache.hadoop.mapred.TextInputFormat
                         file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                        location file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/dest1
+                        location file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/dest1
                       serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                       name: dest1
 
@@ -142,7 +146,7 @@
     Move Operator
       tables:
             replace: true
-            source: /data/users/zshao/tools/416-trunk-apache-hive/ql/../build/ql/tmp/795506225.10000.insclause-0
+            source: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/93836917.10000.insclause-0
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -156,11 +160,20 @@
                   serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                   file.inputformat org.apache.hadoop.mapred.TextInputFormat
                   file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                  location file:/data/users/zshao/tools/416-trunk-apache-hive/build/ql/test/data/warehouse/dest1
+                  location file:/data/users/athusoo/commits/hive_trunk_ws8/build/ql/test/data/warehouse/dest1
                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                 name: dest1
+            tmp directory: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/93836917.10001
 
 
+query: FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key)
+INSERT OVERWRITE TABLE dest1 SELECT src1.key, src2.value where src1.ds = '2008-04-08' and src1.hr = '12'
+Input: default/src
+Input: default/srcpart/ds=2008-04-08/hr=12
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/280910510/328815293.10000
 0	val_0
 0	val_0
 0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce1.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce1.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce1.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce1.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+DISTRIBUTE BY tvalue, tkey
+SORT BY ten, one
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST tkey ten one tvalue)))) (TOK_DISTRIBUTEBY (TOK_TABLE_OR_COL tvalue) (TOK_TABLE_OR_COL tkey)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL ten)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL one)))))
 
@@ -79,6 +87,17 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+DISTRIBUTE BY tvalue, tkey
+SORT BY ten, one
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/215905920/1186087609.10000
 0	0	0	val_0
 0	0	0	val_0
 0	0	0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,10 @@
+query: CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+DISTRIBUTE BY tvalue, tkey
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST tkey ten one tvalue)))) (TOK_DISTRIBUTEBY (TOK_TABLE_OR_COL tvalue) (TOK_TABLE_OR_COL tkey))))
 
@@ -74,6 +81,16 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+DISTRIBUTE BY tvalue, tkey
+Input: default/src
+Output: default/dest1
+query: SELECT * FROM (SELECT dest1.* FROM dest1 DISTRIBUTE BY key SORT BY key, ten, one, value) T
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/21517063/428269906.10000
 0	0	0	val_0
 0	0	0	val_0
 0	0	0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce3.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce3.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce3.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce3.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,10 @@
+query: CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+SORT BY tvalue, tkey
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST tkey ten one tvalue)))) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL tvalue)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL tkey)))))
 
@@ -74,6 +81,16 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+SORT BY tvalue, tkey
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/122478505/180989797.10000
 0	0	0	val_0
 0	0	0	val_0
 0	0	0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce4.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce4.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce4.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce4.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+DISTRIBUTE BY tvalue, tkey
+SORT BY ten DESC, one ASC
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST tkey ten one tvalue)))) (TOK_DISTRIBUTEBY (TOK_TABLE_OR_COL tvalue) (TOK_TABLE_OR_COL tkey)) (TOK_SORTBY (TOK_TABSORTCOLNAMEDESC (TOK_TABLE_OR_COL ten)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL one)))))
 
@@ -79,6 +87,17 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (tkey, ten, one, tvalue)
+DISTRIBUTE BY tvalue, tkey
+SORT BY ten DESC, one ASC
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/608149359/217174258.10000
 90	9	0	val_90
 90	9	0	val_90
 90	9	0	val_90

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce5.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce5.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce5.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce5.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,10 @@
+query: CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+SELECT src.key as c1, CAST(src.key / 10 AS INT) as c2, CAST(src.key % 10 AS INT) as c3, src.value as c4
+DISTRIBUTE BY c4, c1
+SORT BY c2 DESC, c3 ASC
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) c2) (TOK_SELEXPR (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)) (TOK_DISTRIBUTEBY (TOK_TABLE_OR_COL c4) (TOK_TABLE_OR_COL c1)) (TOK_SORTBY (TOK_TABSORTCOLNAMEDESC (TOK_TABLE_OR_COL c2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL c3)))))
 
@@ -74,6 +81,16 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+SELECT src.key as c1, CAST(src.key / 10 AS INT) as c2, CAST(src.key % 10 AS INT) as c3, src.value as c4
+DISTRIBUTE BY c4, c1
+SORT BY c2 DESC, c3 ASC
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/38926801/280803016.10000
 490	49	0	val_490
 491	49	1	val_491
 492	49	2	val_492

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce6.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce6.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce6.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce6.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,10 @@
+query: CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+SELECT src.key, CAST(src.key / 10 AS INT) as c2, CAST(src.key % 10 AS INT) as c3, src.value
+DISTRIBUTE BY value, key
+SORT BY c2 DESC, c3 ASC
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key)) (TOK_SELEXPR (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) c2) (TOK_SELEXPR (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value))) (TOK_DISTRIBUTEBY (TOK_TABLE_OR_COL value) (TOK_TABLE_OR_COL key)) (TOK_SORTBY (TOK_TABSORTCOLNAMEDESC (TOK_TABLE_OR_COL c2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL c3)))))
 
@@ -74,6 +81,16 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+SELECT src.key, CAST(src.key / 10 AS INT) as c2, CAST(src.key % 10 AS INT) as c3, src.value
+DISTRIBUTE BY value, key
+SORT BY c2 DESC, c3 ASC
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/589725073/176567235.10000
 490	49	0	val_490
 491	49	1	val_491
 492	49	2	val_492

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce7.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce7.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce7.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce7.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,10 @@
+query: CREATE TABLE dest1(k STRING, v STRING, key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.*, src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (k, v, tkey, ten, one, tvalue)
+SORT BY tvalue, tkey
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (TOK_ALLCOLREF src) (. (TOK_TABLE_OR_COL src) key) (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST k v tkey ten one tvalue)))) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL tvalue)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL tkey)))))
 
@@ -86,6 +93,16 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.*, src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (k, v, tkey, ten, one, tvalue)
+SORT BY tvalue, tkey
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/211040223/672345730.10000
 0	val_0	0	0	0	val_0
 0	val_0	0	0	0	val_0
 0	val_0	0	0	0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce8.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce8.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce8.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/mapreduce8.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: CREATE TABLE dest1(k STRING, v STRING, key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.*, src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (k, v, tkey, ten, one, tvalue)
+DISTRIBUTE BY rand(3)
+SORT BY tvalue, tkey
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (TOK_ALLCOLREF src) (. (TOK_TABLE_OR_COL src) key) (TOK_FUNCTION TOK_INT (/ (. (TOK_TABLE_OR_COL src) key) 10)) (TOK_FUNCTION TOK_INT (% (. (TOK_TABLE_OR_COL src) key) 10)) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST k v tkey ten one tvalue)))) (TOK_DISTRIBUTEBY (TOK_FUNCTION rand 3)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL tvalue)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL tkey)))))
 
@@ -89,6 +97,17 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1
+MAP src.*, src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
+USING '/bin/cat' AS (k, v, tkey, ten, one, tvalue)
+DISTRIBUTE BY rand(3)
+SORT BY tvalue, tkey
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/903115095/320438958.10000
 0	val_0	0	0	0	val_0
 0	val_0	0	0	0	val_0
 0	val_0	0	0	0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/noalias_subq1.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/noalias_subq1.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/noalias_subq1.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/noalias_subq1.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,5 @@
+query: EXPLAIN
+SELECT c1 FROM (select value as c1, key as c2 from src) x where c2 < 100
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value) c1) (TOK_SELEXPR (TOK_TABLE_OR_COL key) c2)))) x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL c1))) (TOK_WHERE (< (TOK_TABLE_OR_COL c2) 100))))
 
@@ -36,6 +38,9 @@
       limit: -1
 
 
+query: SELECT c1 FROM (select value as c1, key as c2 from src) x where c2 < 100
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/4961385/1570794008.10000
 val_86
 val_27
 val_98

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias1.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias1.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias1.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias1.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,7 @@
+query: CREATE TABLE dest1(dummy STRING, key INT, value DOUBLE) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1 SELECT '1234', key, count(1) WHERE src.key < 100 group by key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR '1234') (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL src) key) 100)) (TOK_GROUPBY (TOK_TABLE_OR_COL key))))
 
@@ -81,6 +85,13 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1 SELECT '1234', key, count(1) WHERE src.key < 100 group by key
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/518865147/140769590.10000
 1234	0	3.0
 1234	10	1.0
 1234	11	1.0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/notable_alias2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,7 @@
+query: CREATE TABLE dest1(dummy STRING, key INT, value DOUBLE) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src
+INSERT OVERWRITE TABLE dest1 SELECT '1234', src.key, count(1) WHERE key < 100 group by src.key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest1)) (TOK_SELECT (TOK_SELEXPR '1234') (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 100)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL src) key))))
 
@@ -81,6 +85,13 @@
                 name: dest1
 
 
+query: FROM src
+INSERT OVERWRITE TABLE dest1 SELECT '1234', src.key, count(1) WHERE key < 100 group by src.key
+Input: default/src
+Output: default/dest1
+query: SELECT dest1.* FROM dest1
+Input: default/dest1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/73789711/581555617.10000
 1234	0	3.0
 1234	10	1.0
 1234	11	1.0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,5 @@
+query: explain
+select count(1) from src x where x.key > 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -49,7 +51,12 @@
       limit: -1
 
 
+query: select count(1) from src x where x.key > 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/207777648/268938083.10000
 0
+query: explain
+select count(1) from src x where x.key > 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -101,7 +108,12 @@
       limit: -1
 
 
+query: select count(1) from src x where x.key > 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/7619133/38786.10000
 0
+query: explain
+select count(1) from src x where x.key > 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -148,7 +160,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/135887310/743300630.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/358258135/421877482.10002 
           Reduce Output Operator
             sort order: 
             tag: -1
@@ -176,7 +188,12 @@
       limit: -1
 
 
+query: select count(1) from src x where x.key > 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/23717650/593465976.10000
 0
+query: explain
+select count(1) from src x where x.key > 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -224,4 +241,7 @@
       limit: -1
 
 
+query: select count(1) from src x where x.key > 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/297371777/298775966.10000
 0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,5 @@
+query: explain
+select x.key, count(1) from src x where x.key > 9999 group by x.key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key))))
 
@@ -57,7 +59,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/520309707/211312349.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/538828350/1358281988.10002 
           Reduce Output Operator
             key expressions:
                   expr: 0
@@ -96,6 +98,11 @@
       limit: -1
 
 
+query: select x.key, count(1) from src x where x.key > 9999 group by x.key
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/324222383/5029306.10000
+query: explain
+select x.key, count(1) from src x where x.key > 9999 group by x.key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key))))
 
@@ -161,6 +168,11 @@
       limit: -1
 
 
+query: select x.key, count(1) from src x where x.key > 9999 group by x.key
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/354390972/29453903.10000
+query: explain
+select x.key, count(1) from src x where x.key > 9999 group by x.key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key))))
 
@@ -213,7 +225,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/1162050685/275319179.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/221557343/272912479.10002 
           Reduce Output Operator
             key expressions:
                   expr: 0
@@ -252,6 +264,11 @@
       limit: -1
 
 
+query: select x.key, count(1) from src x where x.key > 9999 group by x.key
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/238392747/257741696.10000
+query: explain
+select x.key, count(1) from src x where x.key > 9999 group by x.key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL x) key) 9999)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key))))
 
@@ -310,3 +327,6 @@
       limit: -1
 
 
+query: select x.key, count(1) from src x where x.key > 9999 group by x.key
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/865137866/5631075.10000

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup3.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup3.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup3.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup3.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,9 @@
+query: DROP TABLE tstparttbl
+query: CREATE TABLE tstparttbl(KEY STRING, VALUE STRING) PARTITIONED BY(ds string) STORED AS TEXTFILE
+query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt' INTO TABLE tstparttbl PARTITION (ds='2008-04-09')
+query: LOAD DATA LOCAL INPATH '../data/files/nullfile.txt' INTO TABLE tstparttbl PARTITION (ds='2008-04-08')
+query: explain
+select count(1) from tstparttbl
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF tstparttbl)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)))))
 
@@ -42,7 +48,17 @@
       limit: -1
 
 
+query: select count(1) from tstparttbl
+Input: default/tstparttbl/ds=2008-04-09
+Input: default/tstparttbl/ds=2008-04-08
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/1221493083/197971283.10000
 500
+query: DROP TABLE tstparttbl2
+query: CREATE TABLE tstparttbl2(KEY STRING, VALUE STRING) PARTITIONED BY(ds string) STORED AS TEXTFILE
+query: LOAD DATA LOCAL INPATH '../data/files/nullfile.txt' INTO TABLE tstparttbl2 PARTITION (ds='2008-04-09')
+query: LOAD DATA LOCAL INPATH '../data/files/nullfile.txt' INTO TABLE tstparttbl2 PARTITION (ds='2008-04-08')
+query: explain
+select count(1) from tstparttbl2
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF tstparttbl2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)))))
 
@@ -87,6 +103,16 @@
       limit: -1
 
 
+query: select count(1) from tstparttbl2
+Input: default/tstparttbl2/ds=2008-04-09
+Input: default/tstparttbl2/ds=2008-04-08
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/200536084/27806968.10000
+query: DROP TABLE tstparttbl
+query: CREATE TABLE tstparttbl(KEY STRING, VALUE STRING) PARTITIONED BY(ds string) STORED AS TEXTFILE
+query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt' INTO TABLE tstparttbl PARTITION (ds='2008-04-09')
+query: LOAD DATA LOCAL INPATH '../data/files/nullfile.txt' INTO TABLE tstparttbl PARTITION (ds='2008-04-08')
+query: explain
+select count(1) from tstparttbl
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF tstparttbl)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)))))
 
@@ -131,7 +157,17 @@
       limit: -1
 
 
+query: select count(1) from tstparttbl
+Input: default/tstparttbl/ds=2008-04-09
+Input: default/tstparttbl/ds=2008-04-08
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/1474931838/738960864.10000
 500
+query: DROP TABLE tstparttbl2
+query: CREATE TABLE tstparttbl2(KEY STRING, VALUE STRING) PARTITIONED BY(ds string) STORED AS TEXTFILE
+query: LOAD DATA LOCAL INPATH '../data/files/nullfile.txt' INTO TABLE tstparttbl2 PARTITION (ds='2008-04-09')
+query: LOAD DATA LOCAL INPATH '../data/files/nullfile.txt' INTO TABLE tstparttbl2 PARTITION (ds='2008-04-08')
+query: explain
+select count(1) from tstparttbl2
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF tstparttbl2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)))))
 
@@ -176,3 +212,7 @@
       limit: -1
 
 
+query: select count(1) from tstparttbl2
+Input: default/tstparttbl2/ds=2008-04-09
+Input: default/tstparttbl2/ds=2008-04-08
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/48371033/920895567.10000

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup4.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup4.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup4.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/nullgroup4.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,5 @@
+query: explain
+select count(1), count(distinct x.value) from src x where x.key = 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)) (TOK_SELEXPR (TOK_FUNCTIONDI count (. (TOK_TABLE_OR_COL x) value)))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -54,7 +56,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/170706765/632939441.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/197465075/17827977.10002 
           Reduce Output Operator
             sort order: 
             tag: -1
@@ -87,7 +89,12 @@
       limit: -1
 
 
+query: select count(1), count(distinct x.value) from src x where x.key = 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/41184047/371297068.10000
 0	0
+query: explain
+select count(1), count(distinct x.value) from src x where x.key = 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)) (TOK_SELEXPR (TOK_FUNCTIONDI count (. (TOK_TABLE_OR_COL x) value)))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -147,7 +154,12 @@
       limit: -1
 
 
+query: select count(1), count(distinct x.value) from src x where x.key = 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/23213601/1066583085.10000
 0	0
+query: explain
+select count(1), count(distinct x.value) from src x where x.key = 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)) (TOK_SELEXPR (TOK_FUNCTIONDI count (. (TOK_TABLE_OR_COL x) value)))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -194,7 +206,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/1436596988/17006007.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/748002219/277619044.10002 
           Reduce Output Operator
             sort order: 
             tag: -1
@@ -227,7 +239,12 @@
       limit: -1
 
 
+query: select count(1), count(distinct x.value) from src x where x.key = 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/465677507/154588518.10000
 0	0
+query: explain
+select count(1), count(distinct x.value) from src x where x.key = 9999
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)) (TOK_SELEXPR (TOK_FUNCTIONDI count (. (TOK_TABLE_OR_COL x) value)))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL x) key) 9999))))
 
@@ -277,4 +294,7 @@
       limit: -1
 
 
+query: select count(1), count(distinct x.value) from src x where x.key = 9999
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/1165280510/243543412.10000
 0	0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/nullinput.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/nullinput.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/nullinput.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/nullinput.q.out Tue May  5 22:17:36 2009
@@ -0,0 +1,8 @@
+query: create table tstnullinut(a string, b string)
+query: select x.* from tstnullinut x
+Input: default/tstnullinut
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/252572061/456825886.10000
+query: select x.a, count(1) from tstnullinut x group by x.a
+Input: default/tstnullinut
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/584851051/141046837.10000
+query: drop table tstnullinut

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/order.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/order.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/order.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/order.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,5 @@
+query: EXPLAIN
+SELECT x.* FROM SRC x ORDER BY key limit 10
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF SRC x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF x))) (TOK_ORDERBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
 
@@ -42,6 +44,9 @@
       limit: 10
 
 
+query: SELECT x.* FROM SRC x ORDER BY key limit 10
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/1564222471/1481411475.10000
 0	val_0
 0	val_0
 0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/order2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/order2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/order2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/order2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,7 @@
+query: EXPLAIN
+SELECT subq.key, subq.value FROM 
+(SELECT x.* FROM SRC x ORDER BY key limit 10) subq
+where subq.key < 10
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF SRC x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF x))) (TOK_ORDERBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10))) subq)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) value))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL subq) key) 10))))
 
@@ -52,6 +56,11 @@
       limit: -1
 
 
+query: SELECT subq.key, subq.value FROM 
+(SELECT x.* FROM SRC x ORDER BY key limit 10) subq
+where subq.key < 10
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/743790712/1177897584.10000
 0	val_0
 0	val_0
 0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_clusterby.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_clusterby.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_clusterby.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_clusterby.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,5 @@
+query: EXPLAIN
+SELECT * FROM SRC x where x.key = 10 CLUSTER BY x.key
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF SRC x)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (= (. (TOK_TABLE_OR_COL x) key) 10)) (TOK_CLUSTERBY (. (TOK_TABLE_OR_COL x) key))))
 
@@ -52,7 +54,12 @@
       limit: -1
 
 
+query: SELECT * FROM SRC x where x.key = 10 CLUSTER BY x.key
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/500213612/116730221.10000
 10	val_10
+query: EXPLAIN 
+SELECT x.key, x.value as v1, y.key  FROM SRC x JOIN SRC y ON (x.key = y.key)  where x.key = 20 CLUSTER BY v1
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF SRC x) (TOK_TABREF SRC y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value) v1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) key))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL x) key) 20)) (TOK_CLUSTERBY (TOK_TABLE_OR_COL v1))))
 
@@ -131,7 +138,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/184785750/636311536.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/23042782/2223093.10002 
           Reduce Output Operator
             key expressions:
                   expr: 1
@@ -162,4 +169,7 @@
       limit: -1
 
 
+query: SELECT x.key, x.value as v1, y.key  FROM SRC x JOIN SRC y ON (x.key = y.key) where x.key = 20 CLUSTER BY v1
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/50956604/873637666.10000
 20	val_20	20

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_constant_expr.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_constant_expr.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_constant_expr.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_constant_expr.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,7 @@
+query: CREATE TABLE ppd_constant_expr(c1 STRING, c2 INT, c3 DOUBLE) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src1 
+INSERT OVERWRITE TABLE ppd_constant_expr SELECT 4 + NULL, src1.key - NULL, NULL + NULL
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF src1)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB ppd_constant_expr)) (TOK_SELECT (TOK_SELEXPR (+ 4 TOK_NULL)) (TOK_SELEXPR (- (. (TOK_TABLE_OR_COL src1) key) TOK_NULL)) (TOK_SELEXPR (+ TOK_NULL TOK_NULL)))))
 
@@ -50,6 +54,13 @@
                 name: ppd_constant_expr
 
 
+query: FROM src1 
+INSERT OVERWRITE TABLE ppd_constant_expr SELECT 4 + NULL, src1.key - NULL, NULL + NULL
+Input: default/src1
+Output: default/ppd_constant_expr
+query: SELECT ppd_constant_expr.* FROM ppd_constant_expr
+Input: default/ppd_constant_expr
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/254664389/264213010.10000
 NULL	NULL	NULL
 NULL	NULL	NULL
 NULL	NULL	NULL
@@ -75,3 +86,4 @@
 NULL	NULL	NULL
 NULL	NULL	NULL
 NULL	NULL	NULL
+query: DROP TABLE ppd_constant_expr

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,8 @@
+query: EXPLAIN
+SELECT src1.c1 
+FROM
+(SELECT src.value as c1, count(src.key) as c2 from src where src.value > 'val_10' group by src.value) src1
+WHERE src1.c1 > 'val_200' and (src1.c2 > 30 or src1.c1 < 'val_400')
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c1) (TOK_SELEXPR (TOK_FUNCTION count (. (TOK_TABLE_OR_COL src) key)) c2)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) value) 'val_10')) (TOK_GROUPBY (. (TOK_TABLE_OR_COL src) value)))) src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c1))) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) c1) 'val_200') (or (> (. (TOK_TABLE_OR_COL src1) c2) 30) (< (. (TOK_TABLE_OR_COL src1) c1) 'val_400'))))))
 
@@ -71,6 +76,12 @@
       limit: -1
 
 
+query: SELECT src1.c1 
+FROM
+(SELECT src.value as c1, count(src.key) as c2 from src where src.value > 'val_10' group by src.value) src1
+WHERE src1.c1 > 'val_200' and (src1.c2 > 30 or src1.c1 < 'val_400')
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/149093602/149899687.10000
 val_201
 val_202
 val_203

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,9 @@
+query: EXPLAIN
+SELECT max(src1.c1), src1.c2 
+FROM
+(SELECT src.value AS c1, count(src.key) AS c2 FROM src WHERE src.value > 'val_10' GROUP BY src.value) src1
+WHERE src1.c1 > 'val_200' AND (src1.c2 > 30 OR src1.c1 < 'val_400')
+GROUP BY src1.c2
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c1) (TOK_SELEXPR (TOK_FUNCTION count (. (TOK_TABLE_OR_COL src) key)) c2)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) value) 'val_10')) (TOK_GROUPBY (. (TOK_TABLE_OR_COL src) value)))) src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION max (. (TOK_TABLE_OR_COL src1) c1))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c2))) (TOK_WHERE (AND (> (. (TOK_TABLE_OR_COL src1) c1) 'val_200') (OR (> (. (TOK_TABLE_OR_COL src1) c2) 30) (< (. (TOK_TABLE_OR_COL src1) c1) 'val_400')))) (TOK_GROUPBY (. (TOK_TABLE_OR_COL src1) c2))))
 
@@ -74,7 +80,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/51382151/746919794.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/876834044/233635262.10002 
           Reduce Output Operator
             key expressions:
                   expr: 0
@@ -113,6 +119,13 @@
       limit: -1
 
 
+query: SELECT max(src1.c1), src1.c2 
+FROM
+(SELECT src.value AS c1, count(src.key) AS c2 FROM src WHERE src.value > 'val_10' GROUP BY src.value) src1
+WHERE src1.c1 > 'val_200' AND (src1.c2 > 30 OR src1.c1 < 'val_400')
+GROUP BY src1.c2
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/1510230396/496559697.10000
 val_4	1
 val_399	2
 val_396	3

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby_join.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby_join.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby_join.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_gby_join.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,12 @@
+query: EXPLAIN
+SELECT src1.c1, count(1) 
+FROM
+(SELECT src.key AS c1, src.value AS c2 from src where src.key > '1' ) src1
+JOIN
+(SELECT src.key AS c3, src.value AS c4 from src where src.key > '2' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+WHERE src1.c1 > '20' AND (src1.c2 < 'val_50' OR src1.c1 > '2') AND (src2.c3 > '50' OR src1.c1 < '50') AND (src2.c3 <> '4')
+GROUP BY src1.c1
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) key) '1')))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) key) '2')))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) '400')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c1)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (AND (AND (AND (> (. (TOK_TABLE_OR_COL src1) c1) '20') (OR (< (. (TOK_TABLE_OR_COL src1) c2) 'val_50') (> (. (TOK_TABLE_OR_COL src
 1) c1) '2'))) (OR (> (. (TOK_TABLE_OR_COL src2) c3) '50') (< (. (TOK_TABLE_OR_COL src1) c1) '50'))) (<> (. (TOK_TABLE_OR_COL src2) c3) '4'))) (TOK_GROUPBY (. (TOK_TABLE_OR_COL src1) c1))))
 
@@ -101,7 +110,7 @@
   Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
-        /data/users/zshao/tools/416-trunk-apache-hive/build/ql/tmp/409060007/303244387.10002 
+        /data/users/athusoo/commits/hive_trunk_ws8/build/ql/tmp/649258693/64817789.10002 
           Reduce Output Operator
             key expressions:
                   expr: 0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: EXPLAIN
+SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src where src.key > '1' ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key > '2' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+WHERE src1.c1 > '20' and (src1.c2 < 'val_50' or src1.c1 > '2') and (src2.c3 > '50' or src1.c1 < '50') and (src2.c3 <> '4')
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) key) '1')))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) key) '2')))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) '400')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) c4))) (TOK_WHERE (and (and (and (> (. (TOK_TABLE_OR_COL src1) c1) '20') (or (< (. (TOK_TABLE_OR_COL src1) c2) 'val_50') (> (. (TOK_TABLE_OR
 _COL src1) c1) '2'))) (or (> (. (TOK_TABLE_OR_COL src2) c3) '50') (< (. (TOK_TABLE_OR_COL src1) c1) '50'))) (<> (. (TOK_TABLE_OR_COL src2) c3) '4')))))
 
@@ -100,6 +108,15 @@
       limit: -1
 
 
+query: SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src where src.key > '1' ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key > '2' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+WHERE src1.c1 > '20' and (src1.c2 < 'val_50' or src1.c1 > '2') and (src2.c3 > '50' or src1.c1 < '50') and (src2.c3 <> '4')
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/351743825/114158213.10000
 200	val_200
 200	val_200
 200	val_200

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,14 @@
+query: EXPLAIN
+SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src where src.key <> '302' ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key <> '305' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+JOIN
+(SELECT src.key as c5, src.value as c6 from src where src.key <> '306' ) src3
+ON src1.c2 = src3.c6
+WHERE src1.c1 <> '311' and (src1.c2 <> 'val_50' or src1.c1 > '1') and (src2.c3 <> '10' or src1.c1 <> '10') and (src2.c3 <> '14') and (sqrt(src3.c5) <> 13)
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)) (TOK_WHERE (<> (. (TOK_TABLE_OR_COL src) key) '302')))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)) (TOK_WHERE (<> (. (TOK_TABLE_OR_COL src) key) '305')))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) '400'))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c5) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c6)) (TOK_WHERE (<> (. (TOK_TABLE_OR_COL src) key) '306')))) s
 rc3) (= (. (TOK_TABLE_OR_COL src1) c2) (. (TOK_TABLE_OR_COL src3) c6)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) c4))) (TOK_WHERE (and (and (and (and (<> (. (TOK_TABLE_OR_COL src1) c1) '311') (or (<> (. (TOK_TABLE_OR_COL src1) c2) 'val_50') (> (. (TOK_TABLE_OR_COL src1) c1) '1'))) (or (<> (. (TOK_TABLE_OR_COL src2) c3) '10') (<> (. (TOK_TABLE_OR_COL src1) c1) '10'))) (<> (. (TOK_TABLE_OR_COL src2) c3) '14')) (<> (TOK_FUNCTION sqrt (. (TOK_TABLE_OR_COL src3) c5)) 13)))))
 
@@ -167,6 +178,18 @@
       limit: -1
 
 
+query: SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src where src.key <> '302' ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key <> '305' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+JOIN
+(SELECT src.key as c5, src.value as c6 from src where src.key <> '306' ) src3
+ON src1.c2 = src3.c6
+WHERE src1.c1 <> '311' and (src1.c2 <> 'val_50' or src1.c1 > '1') and (src2.c3 <> '10' or src1.c1 <> '10') and (src2.c3 <> '14') and (sqrt(src3.c5) <> 13)
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/44924503/742261563.10000
 0	val_0
 0	val_0
 0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join3.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join3.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join3.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_join3.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,14 @@
+query: EXPLAIN
+SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src where src.key <> '11' ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key <> '12' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+JOIN
+(SELECT src.key as c5, src.value as c6 from src where src.key <> '13' ) src3
+ON src1.c1 = src3.c5
+WHERE src1.c1 > '0' and (src1.c2 <> 'val_500' or src1.c1 > '1') and (src2.c3 > '10' or src1.c1 <> '10') and (src2.c3 <> '4') and (src3.c5 <> '1')
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)) (TOK_WHERE (<> (. (TOK_TABLE_OR_COL src) key) '11')))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)) (TOK_WHERE (<> (. (TOK_TABLE_OR_COL src) key) '12')))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) '400'))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c5) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c6)) (TOK_WHERE (<> (. (TOK_TABLE_OR_COL src) key) '13')))) src3
 ) (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src3) c5)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) c4))) (TOK_WHERE (and (and (and (and (> (. (TOK_TABLE_OR_COL src1) c1) '0') (or (<> (. (TOK_TABLE_OR_COL src1) c2) 'val_500') (> (. (TOK_TABLE_OR_COL src1) c1) '1'))) (or (> (. (TOK_TABLE_OR_COL src2) c3) '10') (<> (. (TOK_TABLE_OR_COL src1) c1) '10'))) (<> (. (TOK_TABLE_OR_COL src2) c3) '4')) (<> (. (TOK_TABLE_OR_COL src3) c5) '1')))))
 
@@ -131,6 +142,18 @@
       limit: -1
 
 
+query: SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src where src.key <> '11' ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key <> '12' ) src2
+ON src1.c1 = src2.c3 AND src1.c1 < '400'
+JOIN
+(SELECT src.key as c5, src.value as c6 from src where src.key <> '13' ) src3
+ON src1.c1 = src3.c5
+WHERE src1.c1 > '0' and (src1.c2 <> 'val_500' or src1.c1 > '1') and (src2.c3 > '10' or src1.c1 <> '10') and (src2.c3 <> '4') and (src3.c5 <> '1')
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/860297500/296667267.10000
 100	val_100
 100	val_100
 100	val_100

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_multi_insert.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_multi_insert.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_multi_insert.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_multi_insert.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,15 @@
+query: DROP TABLE mi1
+query: DROP TABLE mi2
+query: DROP TABLE mi3
+query: CREATE TABLE mi1(key INT, value STRING) STORED AS TEXTFILE
+query: CREATE TABLE mi2(key INT, value STRING) STORED AS TEXTFILE
+query: CREATE TABLE mi3(key INT) PARTITIONED BY(ds STRING, hr STRING) STORED AS TEXTFILE
+query: EXPLAIN
+FROM src a JOIN src b ON (a.key = b.key)
+INSERT OVERWRITE TABLE mi1 SELECT a.* WHERE a.key < 100
+INSERT OVERWRITE TABLE mi2 SELECT a.key, a.value WHERE a.key >= 100 and a.key < 200
+INSERT OVERWRITE TABLE mi3 PARTITION(ds='2008-04-08', hr='12') SELECT a.key WHERE a.key >= 200 and a.key < 300
+INSERT OVERWRITE DIRECTORY '../build/ql/test/data/warehouse/mi4.out' SELECT a.value WHERE a.key >= 300
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF src a) (TOK_TABREF src b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB mi1)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF a))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 100))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB mi2)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (and (>= (. (TOK_TABLE_OR_COL a) key) 100) (< (. (TOK_TABLE_OR_COL a) key) 200)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB mi3 (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-08') (TOK_PARTVAL hr '12')))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key))) (TOK_WHERE (and (>= (. (TOK_TABLE_OR_COL a) key) 200) (< (. (TOK_TABLE_OR_COL a) key) 300)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR '../build/ql/test/data/warehouse/mi4.out')) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (>= (. (TOK_TABLE_OR_COL a) key) 300))))
 
@@ -160,6 +172,19 @@
                 name: mi3
 
 
+query: FROM src a JOIN src b ON (a.key = b.key)
+INSERT OVERWRITE TABLE mi1 SELECT a.* WHERE a.key < 100
+INSERT OVERWRITE TABLE mi2 SELECT a.key, a.value WHERE a.key >= 100 and a.key < 200
+INSERT OVERWRITE TABLE mi3 PARTITION(ds='2008-04-08', hr='12') SELECT a.key WHERE a.key >= 200 and a.key < 300
+INSERT OVERWRITE DIRECTORY '../build/ql/test/data/warehouse/mi4.out' SELECT a.value WHERE a.key >= 300
+Input: default/src
+Output: default/mi1
+Output: default/mi2
+Output: default/mi3/ds=2008-04-08/hr=12
+Output: ../build/ql/test/data/warehouse/mi4.out
+query: SELECT mi1.* FROM mi1
+Input: default/mi1
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/215104815/940509330.10000
 0	val_0
 0	val_0
 0	val_0
@@ -308,6 +333,9 @@
 98	val_98
 98	val_98
 98	val_98
+query: SELECT mi2.* FROM mi2
+Input: default/mi2
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/196639737/1385053697.10000
 100	val_100
 100	val_100
 100	val_100
@@ -519,6 +547,9 @@
 199	val_199
 199	val_199
 199	val_199
+query: SELECT mi3.* FROM mi3
+Input: default/mi3/ds=2008-04-08/hr=12
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/1010810299/559593156.10000
 200	2008-04-08	12
 200	2008-04-08	12
 200	2008-04-08	12
@@ -1188,3 +1219,6 @@
 val_498
 val_498
 val_498
+query: DROP TABLE mi1
+query: DROP TABLE mi2
+query: DROP TABLE mi3

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join1.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join1.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join1.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join1.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: EXPLAIN
+ FROM 
+  src a
+ LEFT OUTER JOIN 
+  src b 
+ ON (a.key = b.key)
+ SELECT a.key, a.value, b.key, b.value
+ WHERE a.key > 10 AND a.key < 20 AND b.key > 15 AND b.key < 25
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_TABREF src a) (TOK_TABREF src 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)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value))) (TOK_WHERE (AND (AND (AND (> (. (TOK_TABLE_OR_COL a) key) 10) (< (. (TOK_TABLE_OR_COL a) key) 20)) (> (. (TOK_TABLE_OR_COL b) key) 15)) (< (. (TOK_TABLE_OR_COL b) key) 25)))))
 
@@ -76,6 +84,15 @@
       limit: -1
 
 
+query: FROM 
+  src a
+ LEFT OUTER JOIN 
+  src b 
+ ON (a.key = b.key)
+ SELECT a.key, a.value, b.key, b.value
+ WHERE a.key > 10 AND a.key < 20 AND b.key > 15 AND b.key < 25
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/966386723/732369971.10000
 17	val_17	17	val_17
 18	val_18	18	val_18
 18	val_18	18	val_18

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join2.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join2.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join2.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: EXPLAIN
+ FROM 
+  src a
+ RIGHT OUTER JOIN 
+  src b 
+ ON (a.key = b.key)
+ SELECT a.key, a.value, b.key, b.value
+ WHERE a.key > '10' AND a.key < '20' AND b.key > '15' AND b.key < '25'
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_TABREF src a) (TOK_TABREF src 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)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value))) (TOK_WHERE (AND (AND (AND (> (. (TOK_TABLE_OR_COL a) key) '10') (< (. (TOK_TABLE_OR_COL a) key) '20')) (> (. (TOK_TABLE_OR_COL b) key) '15')) (< (. (TOK_TABLE_OR_COL b) key) '25')))))
 
@@ -76,6 +84,15 @@
       limit: -1
 
 
+query: FROM 
+  src a
+ RIGHT OUTER JOIN 
+  src b 
+ ON (a.key = b.key)
+ SELECT a.key, a.value, b.key, b.value
+ WHERE a.key > '10' AND a.key < '20' AND b.key > '15' AND b.key < '25'
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/705048581/107248741.10000
 150	val_150	150	val_150
 152	val_152	152	val_152
 152	val_152	152	val_152

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join3.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join3.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join3.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join3.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: EXPLAIN
+ FROM 
+  src a
+ FULL OUTER JOIN 
+  src b 
+ ON (a.key = b.key)
+ SELECT a.key, a.value, b.key, b.value
+ WHERE a.key > '10' AND a.key < '20' AND b.key > '15' AND b.key < '25'
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_FULLOUTERJOIN (TOK_TABREF src a) (TOK_TABREF src 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)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value))) (TOK_WHERE (AND (AND (AND (> (. (TOK_TABLE_OR_COL a) key) '10') (< (. (TOK_TABLE_OR_COL a) key) '20')) (> (. (TOK_TABLE_OR_COL b) key) '15')) (< (. (TOK_TABLE_OR_COL b) key) '25')))))
 
@@ -72,6 +80,15 @@
       limit: -1
 
 
+query: FROM 
+  src a
+ FULL OUTER JOIN 
+  src b 
+ ON (a.key = b.key)
+ SELECT a.key, a.value, b.key, b.value
+ WHERE a.key > '10' AND a.key < '20' AND b.key > '15' AND b.key < '25'
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/68623657/698316651.10000
 150	val_150	150	val_150
 152	val_152	152	val_152
 152	val_152	152	val_152

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join4.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join4.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_outer_join4.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,14 @@
+query: EXPLAIN
+ FROM 
+  src a
+ LEFT OUTER JOIN
+  src b
+ ON (a.key = b.key)
+ RIGHT OUTER JOIN 
+  src c 
+ ON (a.key = c.key)
+ SELECT a.key, a.value, b.key, b.value, c.key
+ WHERE a.key > '10' AND a.key < '20' AND b.key > '15' AND b.key < '25' AND sqrt(c.key) <> 13
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF src a) (TOK_TABREF src b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key))) (TOK_TABREF src c) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL c) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) key))) (TOK_WHERE (AND (AND (AND (AND (> (. (TOK_TABLE_OR_COL a) key) '10') (< (. (TOK_TABLE_OR_COL a) key) '20')) (> (. (TOK_TABLE_OR_COL b) key) '15')) (< (. (TOK_TABLE_OR_COL b) key) '25')) (<> (TOK_FUNCTION sqrt (. (TOK_TABLE_OR_COL c) key)) 13)))))
 
@@ -93,6 +104,18 @@
       limit: -1
 
 
+query: FROM 
+  src a
+ LEFT OUTER JOIN
+  src b
+ ON (a.key = b.key)
+ RIGHT OUTER JOIN 
+  src c 
+ ON (a.key = c.key)
+ SELECT a.key, a.value, b.key, b.value, c.key
+ WHERE a.key > '10' AND a.key < '20' AND b.key > '15' AND b.key < '25' AND sqrt(c.key) <> 13
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/162901485/37973931.10000
 150	val_150	150	val_150	150
 152	val_152	152	val_152	152
 152	val_152	152	val_152	152

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_random.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_random.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_random.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_random.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: EXPLAIN
+SELECT src1.c1, src2.c4 
+FROM
+(SELECT src.key as c1, src.value as c2 from src ) src1
+JOIN
+(SELECT src.key as c3, src.value as c4 from src where src.key > '2' ) src2
+ON src1.c1 = src2.c3
+WHERE rand() > 0.5
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)) (TOK_WHERE (> (. (TOK_TABLE_OR_COL src) key) '2')))) src2) (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) c4))) (TOK_WHERE (> (TOK_FUNCTION rand) 0.5))))
 

Modified: hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_transform.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_transform.q.out?rev=771990&r1=771989&r2=771990&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_transform.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/ppd_transform.q.out Tue May  5 22:17:36 2009
@@ -1,3 +1,11 @@
+query: EXPLAIN
+FROM (
+  FROM src
+  SELECT TRANSFORM(src.key, src.value)
+         USING '/bin/cat' AS (tkey, tvalue) 
+  CLUSTER BY tkey 
+) tmap
+SELECT tmap.tkey, tmap.tvalue WHERE tmap.tkey < 100
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (. (TOK_TABLE_OR_COL src) value)) '/bin/cat' (TOK_ALIASLIST tkey tvalue)))) (TOK_CLUSTERBY (TOK_TABLE_OR_COL tkey)))) tmap)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL tmap) tkey)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL tmap) tvalue))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL tmap) tkey) 100))))
 
@@ -59,6 +67,15 @@
       limit: -1
 
 
+query: FROM (
+  FROM src
+  SELECT TRANSFORM(src.key, src.value)
+         USING '/bin/cat' AS (tkey, tvalue) 
+  CLUSTER BY tkey 
+) tmap
+SELECT tmap.tkey, tmap.tvalue WHERE tmap.tkey < 100
+Input: default/src
+Output: /data/users/athusoo/commits/hive_trunk_ws8/ql/../build/ql/tmp/872181982/534231229.10000
 0	val_0
 0	val_0
 0	val_0



Mime
View raw message