FAQ
Author: zshao
Date: Fri Jan 22 06:26:53 2010
New Revision: 902007

URL: http://svn.apache.org/viewvc?rev=902007&view=rev
Log:
HIVE-1072. Show table extended to error out when the partition does not exist. (Yongqiang He via zshao)

Added:
hadoop/hive/trunk/ql/src/test/queries/clientnegative/show_tablestatus_not_existing_part.q
hadoop/hive/trunk/ql/src/test/results/clientnegative/show_tablestatus_not_existing_part.q.out
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=902007&r1=902006&r2=902007&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Fri Jan 22 06:26:53 2010
@@ -53,6 +53,9 @@
HIVE-1075. Make it possible for users to recover data when moveTask fails
(Zheng Shao via Ning Zhang)

+ HIVE-1072. Show table extended to error out when the partition does not exist.
+ (Yongqiang He via zshao)
+
Release 0.5.0 - Unreleased

INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=902007&r1=902006&r2=902007&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Fri Jan 22 06:26:53 2010
@@ -574,6 +574,10 @@
Table tbl = db.getTable(showTblStatus.getDbName(), showTblStatus
.getPattern());
par = db.getPartition(tbl, part, false);
+ if (par == null) {
+ throw new HiveException("Partition " + part + " for table "
+ + showTblStatus.getPattern() + " does not exist.");
+ }
tbls.add(tbl);
} else {
LOG.info("pattern: " + showTblStatus.getPattern());

Added: hadoop/hive/trunk/ql/src/test/queries/clientnegative/show_tablestatus_not_existing_part.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientnegative/show_tablestatus_not_existing_part.q?rev=902007&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientnegative/show_tablestatus_not_existing_part.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientnegative/show_tablestatus_not_existing_part.q Fri Jan 22 06:26:53 2010
@@ -0,0 +1 @@
+SHOW TABLE EXTENDED LIKE `srcpart` PARTITION(ds='2008-14-08', hr=11);
\ No newline at end of file

Added: hadoop/hive/trunk/ql/src/test/results/clientnegative/show_tablestatus_not_existing_part.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientnegative/show_tablestatus_not_existing_part.q.out?rev=902007&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientnegative/show_tablestatus_not_existing_part.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientnegative/show_tablestatus_not_existing_part.q.out Fri Jan 22 06:26:53 2010
@@ -0,0 +1,4 @@
+PREHOOK: query: SHOW TABLE EXTENDED LIKE `srcpart` PARTITION(ds='2008-14-08', hr=11)
+PREHOOK: type: SHOW_TABLESTATUS
+FAILED: Error in metadata: Partition {ds=2008-14-08, hr=11} for table srcpart does not exist.
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 22, '10 at 6:27a
activeJan 22, '10 at 6:27a
posts1
users1
websitehive.apache.org

1 user in discussion

Zshao: 1 post

People

Translate

site design / logo © 2021 Grokbase