You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Igor Kryvenko <kr...@gmail.com> on 2018/06/26 16:43:07 UTC
Re: Review Request 66370: HIVE-18725: Improve error handling for
subqueries if there is wrong column reference
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66370/
-----------------------------------------------------------
(Updated Июнь 26, 2018, 4:43 п.п.)
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 (updated)
-----
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteSubquerySemanticException.java 4321a5c789
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteViewSemanticException.java c2a4e94a03
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java e091f38bc6
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/4/
Changes: https://reviews.apache.org/r/66370/diff/3-4/
Testing
-------
Thanks,
Igor Kryvenko
Re: Review Request 66370: HIVE-18725: Improve error handling for
subqueries if there is wrong column reference
Posted by Vineet Garg <vg...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66370/#review208385
-----------------------------------------------------------
Ship it!
Ship It!
- Vineet Garg
On Sept. 5, 2018, 8 p.m., Igor Kryvenko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66370/
> -----------------------------------------------------------
>
> (Updated Sept. 5, 2018, 8 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/parse/CalcitePlanner.java df40a2878d
> ql/src/test/queries/clientnegative/subquery_non_exisiting_column.q PRE-CREATION
> ql/src/test/results/clientnegative/subquery_corr_from.q.out 3af1a8a710
> ql/src/test/results/clientnegative/subquery_corr_grandparent.q.out 6f06fc71b0
> ql/src/test/results/clientnegative/subquery_corr_select.q.out d95b9397cf
> ql/src/test/results/clientnegative/subquery_non_exisiting_column.q.out PRE-CREATION
> ql/src/test/results/clientnegative/subquery_scalar_multi_columns.q.out ee1e44e1d2
>
>
> Diff: https://reviews.apache.org/r/66370/diff/6/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Igor Kryvenko
>
>
Re: Review Request 66370: HIVE-18725: Improve error handling for
subqueries if there is wrong column reference
Posted by Igor Kryvenko <kr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66370/
-----------------------------------------------------------
(Updated Сен. 5, 2018, 8 п.п.)
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 (updated)
-----
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java df40a2878d
ql/src/test/queries/clientnegative/subquery_non_exisiting_column.q PRE-CREATION
ql/src/test/results/clientnegative/subquery_corr_from.q.out 3af1a8a710
ql/src/test/results/clientnegative/subquery_corr_grandparent.q.out 6f06fc71b0
ql/src/test/results/clientnegative/subquery_corr_select.q.out d95b9397cf
ql/src/test/results/clientnegative/subquery_non_exisiting_column.q.out PRE-CREATION
ql/src/test/results/clientnegative/subquery_scalar_multi_columns.q.out ee1e44e1d2
Diff: https://reviews.apache.org/r/66370/diff/6/
Changes: https://reviews.apache.org/r/66370/diff/5-6/
Testing
-------
Thanks,
Igor Kryvenko
Re: Review Request 66370: HIVE-18725: Improve error handling for
subqueries if there is wrong column reference
Posted by Vineet Garg <vg...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66370/#review208367
-----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
Lines 528 (patched)
<https://reviews.apache.org/r/66370/#comment292253>
Why should missing stats cause AST to reanalyze? This doesn't look correct.
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
Lines 539 (patched)
<https://reviews.apache.org/r/66370/#comment292254>
Same as above. This doesn't look correct.
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
Lines 544 (patched)
<https://reviews.apache.org/r/66370/#comment292255>
So basically if CBO fails due to some reason beside unsupported feature we will end up throwing semantic exception. This will cause the code to not try non-cbo in case of cbo failure. I don't think we want to do that.
- Vineet Garg
On July 1, 2018, 8:55 a.m., Igor Kryvenko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66370/
> -----------------------------------------------------------
>
> (Updated July 1, 2018, 8:55 a.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 4321a5c789
> ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteViewSemanticException.java c2a4e94a03
> ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java e091f38bc6
> 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/5/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Igor Kryvenko
>
>
Re: Review Request 66370: HIVE-18725: Improve error handling for
subqueries if there is wrong column reference
Posted by Igor Kryvenko <kr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66370/
-----------------------------------------------------------
(Updated Июль 1, 2018, 8:55 д.п.)
Review request for hive, Ashutosh Chauhan and Vineet Garg.
Changes
-------
Rewrite the part of handling exception in CalcitePlanner.
1. If we got RuntimeException we just rethrow it.
2. If we got CalciteSemanticException with unsupported feature, we move to non-cbo analyzing.
3. If we got CalciteSemanticException w/o unsupported feature, we just rethrow it, wrapping it to new SemanticException(e.getMessage()), if we just wrap it, we will have redundant exception message with path of CalciteSemanticException.
Also, I've tested the original cause in the Hive CLI, and it throws expected error, that column reference not found.
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 (updated)
-----
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteSubquerySemanticException.java 4321a5c789
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteViewSemanticException.java c2a4e94a03
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java e091f38bc6
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/5/
Changes: https://reviews.apache.org/r/66370/diff/4-5/
Testing
-------
Thanks,
Igor Kryvenko