Repository: hive Updated Branches: refs/heads/master c7d5606b5 -> b60b13f97
HIVE-18724: Improve error handling for subqueries referencing columns(correlated) of its grand-parent query (Igor Kryvenko, reviewed by Vineet Garg) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b60b13f9 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b60b13f9 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b60b13f9 Branch: refs/heads/master Commit: b60b13f9714395ee527593f288475e7507209e15 Parents: c7d5606 Author: Igor Kryvenko <[email protected]> Authored: Mon Sep 10 11:32:27 2018 -0700 Committer: Vineet Garg <[email protected]> Committed: Mon Sep 10 11:33:05 2018 -0700 ---------------------------------------------------------------------- .../queries/clientnegative/subquery_correlated_grand_parent.q | 5 +++++ .../clientnegative/subquery_correlated_grand_parent.q.out | 1 + 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/b60b13f9/ql/src/test/queries/clientnegative/subquery_correlated_grand_parent.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientnegative/subquery_correlated_grand_parent.q b/ql/src/test/queries/clientnegative/subquery_correlated_grand_parent.q new file mode 100644 index 0000000..0aabff1 --- /dev/null +++ b/ql/src/test/queries/clientnegative/subquery_correlated_grand_parent.q @@ -0,0 +1,5 @@ +--! qt:dataset:part + +select t1.p_name from part t1 where t1.p_name IN (select t2.p_name from part t2 where t2.p_name IN + (select max(t3.p_name) from part t3, part t4 where t3.p_name=t2.p_name and t3.p_name=t1.p_name)) + http://git-wip-us.apache.org/repos/asf/hive/blob/b60b13f9/ql/src/test/results/clientnegative/subquery_correlated_grand_parent.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientnegative/subquery_correlated_grand_parent.q.out b/ql/src/test/results/clientnegative/subquery_correlated_grand_parent.q.out new file mode 100644 index 0000000..f93d84d --- /dev/null +++ b/ql/src/test/results/clientnegative/subquery_correlated_grand_parent.q.out @@ -0,0 +1 @@ +FAILED: SemanticException [Error 10004]: org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSubquerySemanticException: Line 4:89 Invalid table alias or column reference 't1': (possible column names are: t3.p_partkey, t3.p_name, t3.p_mfgr, t3.p_brand, t3.p_type, t3.p_size, t3.p_container, t3.p_retailprice, t3.p_comment, t4.p_partkey, t4.p_name, t4.p_mfgr, t4.p_brand, t4.p_type, t4.p_size, t4.p_container, t4.p_retailprice, t4.p_comment)
