FAQ
Author: gates
Date: Fri Sep 19 00:54:21 2014
New Revision: 1626109

URL: http://svn.apache.org/r1626109
Log:
HIVE-8107 Bad error message for non-existent table in update and delete

Added:
     hive/trunk/ql/src/test/queries/clientnegative/update_no_such_table.q
     hive/trunk/ql/src/test/results/clientnegative/update_no_such_table.q.out
Modified:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java?rev=1626109&r1=1626108&r2=1626109&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java Fri Sep 19 00:54:21 2014
@@ -129,7 +129,9 @@ public class UpdateDeleteSemanticAnalyze
      try {
        mTable = db.getTable(tableName[0], tableName[1]);
      } catch (HiveException e) {
- throw new SemanticException(ErrorMsg.UPDATEDELETE_PARSE_ERROR.getMsg(), e);
+ LOG.error("Failed to find table " + getDotName(tableName) + " got exception " +
+ e.getMessage());
+ throw new SemanticException(ErrorMsg.INVALID_TABLE, getDotName(tableName));
      }
      List<FieldSchema> partCols = mTable.getPartCols();


Added: hive/trunk/ql/src/test/queries/clientnegative/update_no_such_table.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/update_no_such_table.q?rev=1626109&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/update_no_such_table.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/update_no_such_table.q Fri Sep 19 00:54:21 2014
@@ -0,0 +1,7 @@
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
+set hive.enforce.bucketing=true;
+
+
+update no_such_table set b = 'fred';

Added: hive/trunk/ql/src/test/results/clientnegative/update_no_such_table.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/update_no_such_table.q.out?rev=1626109&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/update_no_such_table.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/update_no_such_table.q.out Fri Sep 19 00:54:21 2014
@@ -0,0 +1 @@
+FAILED: SemanticException [Error 10001]: Table not found default.no_such_table

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedSep 19, '14 at 12:54a
activeSep 19, '14 at 12:54a
posts1
users1
websitehive.apache.org

1 user in discussion

Gates: 1 post

People

Translate

site design / logo © 2021 Grokbase