IMPALA-5452: Rewrite test case to avoid 'pos'. The original test case accessed the 'pos' field of nested collections. The query results could vary when reloading the data because the order of items within a nested collection is not necessarily the same accross loads.
This patch reformulates the test to avoid 'pos'. Change-Id: I32e47f0845da8b27652faaceae834e025ecff42a Reviewed-on: http://gerrit.cloudera.org:8080/7708 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Impala Public 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/79fba276 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/79fba276 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/79fba276 Branch: refs/heads/master Commit: 79fba2768768107e408644e0caea15f60b5f3354 Parents: 5c82f9d Author: Alex Behm <[email protected]> Authored: Wed Aug 16 17:25:06 2017 -0700 Committer: Impala Public Jenkins <[email protected]> Committed: Fri Aug 18 02:53:23 2017 +0000 ---------------------------------------------------------------------- .../queries/QueryTest/nested-types-subplan.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/79fba276/testdata/workloads/functional-query/queries/QueryTest/nested-types-subplan.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-query/queries/QueryTest/nested-types-subplan.test b/testdata/workloads/functional-query/queries/QueryTest/nested-types-subplan.test index 205978d..82930ad 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/nested-types-subplan.test +++ b/testdata/workloads/functional-query/queries/QueryTest/nested-types-subplan.test @@ -657,3 +657,16 @@ where c_custkey % 100 = 0 and order_cnt != union_cnt - 3; ---- TYPES bigint,bigint,bigint ==== +---- QUERY +# IMPALA-2368: Resetting nested subplans works correctly with an analytic sort. +select count(o_orderkey) +from tpch_nested_parquet.customer c +inner join c.c_orders o +where c_custkey < 10 and c_custkey in + (select lead(l.l_linenumber) over (partition by l.l_shipdate order by l.l_linenumber) + from o.o_lineitems l) +---- RESULTS +3 +---- TYPES +bigint +====
