hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r801831 - in /hadoop/hive/trunk: ./ ql/src/java/org/apache/hadoop/hive/ql/parse/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/ ql/src/test/results/compiler/errors/
Date Thu, 06 Aug 2009 22:57:38 GMT
Author: namit
Date: Thu Aug  6 22:57:37 2009
New Revision: 801831

URL: http://svn.apache.org/viewvc?rev=801831&view=rev
Log:
HIVE-729. Make AS in select list optional. (Zheng Shao via namit)


Added:
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/select_as_omitted.q
    hadoop/hive/trunk/ql/src/test/results/clientpositive/select_as_omitted.q.out
Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
    hadoop/hive/trunk/ql/src/test/results/compiler/errors/invalid_select.q.out

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=801831&r1=801830&r2=801831&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Thu Aug  6 22:57:37 2009
@@ -118,6 +118,8 @@
 
     HIVE-640. Add LazyBinarySerDe to Hive. (Yuntao Jia via zshao)
 
+    HIVE-729. Make AS in select list optional. (Zheng Shao via namit)
+
   IMPROVEMENTS
     HIVE-389. Option to build without ivy (jssarma)
 

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g?rev=801831&r1=801830&r2=801831&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g Thu Aug  6 22:57:37
2009
@@ -691,7 +691,7 @@
 @init { msgs.push("selection target"); }
 @after { msgs.pop(); }
     :
-    ( selectExpression  (KW_AS Identifier)?) -> ^(TOK_SELEXPR selectExpression Identifier?)
+    ( selectExpression  (KW_AS? Identifier)?) -> ^(TOK_SELEXPR selectExpression Identifier?)
     ;
     
 trfmClause

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/select_as_omitted.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/select_as_omitted.q?rev=801831&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/select_as_omitted.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/select_as_omitted.q Thu Aug  6 22:57:37
2009
@@ -0,0 +1,12 @@
+EXPLAIn
+SELECT a, b FROM (
+  SELECT key a, value b
+  FROM src
+) src1
+ORDER BY a LIMIT 1;
+
+SELECT a, b FROM (
+  SELECT key a, value b
+  FROM src
+) src1
+ORDER BY a LIMIT 1;

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/select_as_omitted.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/select_as_omitted.q.out?rev=801831&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/select_as_omitted.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/select_as_omitted.q.out Thu Aug 
6 22:57:37 2009
@@ -0,0 +1,66 @@
+query: EXPLAIn
+SELECT a, b FROM (
+  SELECT key a, value b
+  FROM src
+) src1
+ORDER BY a LIMIT 1
+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 key) a) (TOK_SELEXPR (TOK_TABLE_OR_COL
value) b)))) src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR
(TOK_TABLE_OR_COL a)) (TOK_SELEXPR (TOK_TABLE_OR_COL b))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC
(TOK_TABLE_OR_COL a))) (TOK_LIMIT 1)))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        src1:src 
+            Select Operator
+              expressions:
+                    expr: key
+                    type: string
+                    expr: value
+                    type: string
+              outputColumnNames: _col0, _col1
+              Select Operator
+                expressions:
+                      expr: _col0
+                      type: string
+                      expr: _col1
+                      type: string
+                outputColumnNames: _col0, _col1
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  tag: -1
+                  value expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: string
+      Reduce Operator Tree:
+        Extract
+          Limit
+            File Output Operator
+              compressed: false
+              GlobalTableId: 0
+              table:
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+
+
+query: SELECT a, b FROM (
+  SELECT key a, value b
+  FROM src
+) src1
+ORDER BY a LIMIT 1
+Input: default/src
+Output: file:/data/users/zshao/tools/yjia-trunk-apache-hive/build/ql/tmp/773004929/10000
+0	val_0

Modified: hadoop/hive/trunk/ql/src/test/results/compiler/errors/invalid_select.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/errors/invalid_select.q.out?rev=801831&r1=801830&r2=801831&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/errors/invalid_select.q.out (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/errors/invalid_select.q.out Thu Aug  6
22:57:37 2009
@@ -1 +1 @@
-Parse Error: line 3:2 mismatched input 'trim' expecting FROM in from clause
+Parse Error: line 3:6 mismatched input '(' expecting FROM in from clause



Mime
View raw message