IMPALA-4206: Add column lineage regression test. The underlying issue was already fixed in IMPALA-3940. This patch adds a new regression test to cover the IMPALA-4206.
Change-Id: I5b164000c7b0ce7e2f296d168d75a6860f5963d8 Reviewed-on: http://gerrit.cloudera.org:8080/4556 Reviewed-by: Alex Behm <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/a5e84ac0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/a5e84ac0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/a5e84ac0 Branch: refs/heads/master Commit: a5e84ac01491f8cca8a229c4348a23ae87ddca61 Parents: a35e438 Author: Alex Behm <[email protected]> Authored: Wed Sep 28 13:21:22 2016 -0700 Committer: Internal Jenkins <[email protected]> Committed: Thu Sep 29 07:45:19 2016 +0000 ---------------------------------------------------------------------- .../queries/PlannerTest/lineage.test | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a5e84ac0/testdata/workloads/functional-planner/queries/PlannerTest/lineage.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/lineage.test b/testdata/workloads/functional-planner/queries/PlannerTest/lineage.test index f32e5cc..9ba2ab7 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/lineage.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/lineage.test @@ -4409,3 +4409,47 @@ select a + b as ab, c, d, e from functional.allcomplextypes t, ] } ==== +# IMPALA-4206: Test creating a view whose definition has a subquery and a view reference. +create view test_view_lineage as +select id from functional.alltypes_view v +where not exists (select 1 from functional.alltypes a where v.id = a.id) +---- LINEAGE +{ + "queryText":"create view test_view_lineage as\nselect id from functional.alltypes_view v\nwhere not exists (select 1 from functional.alltypes a where v.id = a.id)", + "hash":"e79b8abc8a682d9e0f6b2c30a6c885f3", + "user":"dev", + "timestamp":1475094005, + "edges":[ + { + "sources":[ + 1 + ], + "targets":[ + 0 + ], + "edgeType":"PROJECTION" + }, + { + "sources":[ + 1 + ], + "targets":[ + 0 + ], + "edgeType":"PREDICATE" + } + ], + "vertices":[ + { + "id":0, + "vertexType":"COLUMN", + "vertexId":"default.test_view_lineage.id" + }, + { + "id":1, + "vertexType":"COLUMN", + "vertexId":"functional.alltypes.id" + } + ] +} +==== \ No newline at end of file
