hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1547817 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/HiveParser.g test/queries/clientpositive/show_partitions.q test/results/clientpositive/show_partitions.q.out test/results/clientpositive/showparts.q.out
Date Wed, 04 Dec 2013 15:09:26 GMT
Author: xuefu
Date: Wed Dec  4 15:09:25 2013
New Revision: 1547817

URL: http://svn.apache.org/r1547817
Log:
HIVE-5912: Show partition command doesn't support db.table (Yu Zhao via Xuefu)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
    hive/trunk/ql/src/test/queries/clientpositive/show_partitions.q
    hive/trunk/ql/src/test/results/clientpositive/show_partitions.q.out
    hive/trunk/ql/src/test/results/clientpositive/showparts.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g?rev=1547817&r1=1547816&r2=1547817&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g Wed Dec  4 15:09:25
2013
@@ -1231,7 +1231,7 @@ showStatement
     | KW_SHOW KW_COLUMNS (KW_FROM|KW_IN) tabname=tableName ((KW_FROM|KW_IN) db_name=identifier)?

     -> ^(TOK_SHOWCOLUMNS $db_name? $tabname)
     | KW_SHOW KW_FUNCTIONS showStmtIdentifier?  -> ^(TOK_SHOWFUNCTIONS showStmtIdentifier?)
-    | KW_SHOW KW_PARTITIONS identifier partitionSpec? -> ^(TOK_SHOWPARTITIONS identifier
partitionSpec?)
+    | KW_SHOW KW_PARTITIONS tabName=tableName partitionSpec? -> ^(TOK_SHOWPARTITIONS $tabName
partitionSpec?) 
     | KW_SHOW KW_CREATE KW_TABLE tabName=tableName -> ^(TOK_SHOW_CREATETABLE $tabName)
     | KW_SHOW KW_TABLE KW_EXTENDED ((KW_FROM|KW_IN) db_name=identifier)? KW_LIKE showStmtIdentifier
partitionSpec?
     -> ^(TOK_SHOW_TABLESTATUS showStmtIdentifier $db_name? partitionSpec?)

Modified: hive/trunk/ql/src/test/queries/clientpositive/show_partitions.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/show_partitions.q?rev=1547817&r1=1547816&r2=1547817&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/show_partitions.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/show_partitions.q Wed Dec  4 15:09:25 2013
@@ -1,4 +1,5 @@
 SHOW PARTITIONS srcpart;
+SHOW PARTITIONS default.srcpart;
 SHOW PARTITIONS srcpart PARTITION(hr='11');
 SHOW PARTITIONS srcpart PARTITION(ds='2008-04-08');
-SHOW PARTITIONS srcpart PARTITION(ds='2008-04-08', hr='12');
\ No newline at end of file
+SHOW PARTITIONS srcpart PARTITION(ds='2008-04-08', hr='12');

Modified: hive/trunk/ql/src/test/results/clientpositive/show_partitions.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/show_partitions.q.out?rev=1547817&r1=1547816&r2=1547817&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/show_partitions.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/show_partitions.q.out Wed Dec  4 15:09:25
2013
@@ -6,6 +6,14 @@ ds=2008-04-08/hr=11
 ds=2008-04-08/hr=12
 ds=2008-04-09/hr=11
 ds=2008-04-09/hr=12
+PREHOOK: query: SHOW PARTITIONS default.srcpart
+PREHOOK: type: SHOWPARTITIONS
+POSTHOOK: query: SHOW PARTITIONS default.srcpart
+POSTHOOK: type: SHOWPARTITIONS
+ds=2008-04-08/hr=11
+ds=2008-04-08/hr=12
+ds=2008-04-09/hr=11
+ds=2008-04-09/hr=12
 PREHOOK: query: SHOW PARTITIONS srcpart PARTITION(hr='11')
 PREHOOK: type: SHOWPARTITIONS
 POSTHOOK: query: SHOW PARTITIONS srcpart PARTITION(hr='11')

Modified: hive/trunk/ql/src/test/results/clientpositive/showparts.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/showparts.q.out?rev=1547817&r1=1547816&r2=1547817&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/showparts.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/showparts.q.out Wed Dec  4 15:09:25 2013
@@ -5,7 +5,7 @@ POSTHOOK: query: EXPLAIN
 SHOW PARTITIONS srcpart
 POSTHOOK: type: SHOWPARTITIONS
 ABSTRACT SYNTAX TREE:
-  (TOK_SHOWPARTITIONS srcpart)
+  (TOK_SHOWPARTITIONS (TOK_TABNAME srcpart))
 
 STAGE DEPENDENCIES:
   Stage-0 is a root stage



Mime
View raw message