> On April 5, 2018, 8:34 p.m., Igor Kryvenko wrote: > > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java > > Line 1314 (original), 1309 (patched) > > <https://reviews.apache.org/r/66370/diff/2/?file=1990863#file1990863line1316> > > > > If it is CalciteSemanticException we convert it to SemanticException > > for saving original cause(CalciteSubquerySemanticException or > > CalciteViewSemanticException). > > If it is Semantic exceptin we just wrapped original message into > > CalciteSemanticException. If > > we will do > > throw new CalciteSemanticException(first) we will have redundant > > exception message such as > > SemanticException : CalciteSemanticException : > > CalciteSubquerySemanticException.
Why create a new exception object if it is SemanticException. Previously if first is instance of SemanticException it was rethrown i.e. throw (SemanticException) first. But now we create a new CalciteSemanticException object. I think we should keep this case like it was i.e. just throw SemanticException as it is. - Vineet ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66370/#review200565 ----------------------------------------------------------- On April 1, 2018, 8:36 p.m., Igor Kryvenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66370/ > ----------------------------------------------------------- > > (Updated April 1, 2018, 8:36 p.m.) > > > Review request for hive, Ashutosh Chauhan and Vineet Garg. > > > Bugs: HIVE-18725 > https://issues.apache.org/jira/browse/HIVE-18725 > > > Repository: hive-git > > > Description > ------- > > If there is a column reference within subquery which doesn't exist Hive > throws misleading error message. > > > Diffs > ----- > > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteSubquerySemanticException.java > 4321a5c7894cec0713ef6e89092ec923f8273b4c > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteViewSemanticException.java > c2a4e94a032b46134932d4bec5f70b197788654b > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java > 41de17fd4679009ef6a4fb5a6d976cbc794ce791 > ql/src/test/queries/clientnegative/subquery_non_exisiting_column.q > PRE-CREATION > ql/src/test/results/clientnegative/subquery_non_exisiting_column.q.out > PRE-CREATION > > > Diff: https://reviews.apache.org/r/66370/diff/2/ > > > Testing > ------- > > > Thanks, > > Igor Kryvenko > >