Author: szehon Date: Tue Apr 21 04:22:51 2015 New Revision: 1675027 URL: http://svn.apache.org/r1675027 Log: HIVE-9923 : No clear message when from is missing (Yongzhi Chen via Szehon)
Added: hive/trunk/ql/src/test/queries/clientnegative/insertsel_fail.q hive/trunk/ql/src/test/results/clientnegative/insertsel_fail.q.out Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 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=1675027&r1=1675026&r2=1675027&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 Tue Apr 21 04:22:51 2015 @@ -2173,7 +2173,7 @@ regularBody[boolean topLevel] i=insertClause ( s=selectStatement[topLevel] - {$s.tree.getChild(1).replaceChildren(0, 0, $i.tree);} -> {$s.tree} + {$s.tree.getChild(1) !=null}? {$s.tree.getChild(1).replaceChildren(0, 0, $i.tree);} -> {$s.tree} | valuesClause -> ^(TOK_QUERY Added: hive/trunk/ql/src/test/queries/clientnegative/insertsel_fail.q URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/insertsel_fail.q?rev=1675027&view=auto ============================================================================== --- hive/trunk/ql/src/test/queries/clientnegative/insertsel_fail.q (added) +++ hive/trunk/ql/src/test/queries/clientnegative/insertsel_fail.q Tue Apr 21 04:22:51 2015 @@ -0,0 +1 @@ +insert overwrite directory 'target/warehouse/aret.out' select a.key src a; Added: hive/trunk/ql/src/test/results/clientnegative/insertsel_fail.q.out URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/insertsel_fail.q.out?rev=1675027&view=auto ============================================================================== --- hive/trunk/ql/src/test/results/clientnegative/insertsel_fail.q.out (added) +++ hive/trunk/ql/src/test/results/clientnegative/insertsel_fail.q.out Tue Apr 21 04:22:51 2015 @@ -0,0 +1 @@ +FAILED: ParseException line 1:72 Failed to recognize predicate 'a'. Failed rule: 'regularBody' in statement