You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Csaba Ringhofer (Jira)" <ji...@apache.org> on 2019/10/22 13:38:00 UTC

[jira] [Updated] (IMPALA-9080) RESULTS section in .test files can unnecessarily check order

     [ https://issues.apache.org/jira/browse/IMPALA-9080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Csaba Ringhofer updated IMPALA-9080:
------------------------------------
    Description: 
Most tests ignore the order of the expected / returned results, but in some cases we expect them to be in the same order (decided by
https://github.com/apache/impala/blob/e05a5323785ecb09e45bdb5dfc96533e68256175/tests/common/test_result_verifier.py#L463 )

The logic above simply checks for the presence of ORDER BY in the query,  while the results should be in a deterministic order only if there is an ORDER BY in the outermost query.
The following query caused a test failure while the rows returned were correct, just in different order:
{code}
select leftSide.id, rnk
from complextypestbl leftSide
left outer join (
    select t.id, rank() over (order by t.id) as rnk
    from complextypestbl t left outer join t.int_array
) rightSide
on leftSide.id = rightSide.id;
{code}

The ORDER BY is in an analytical function, which sorts the results, but those results are joined with a table, and the order of  rows returned by JOIN can be non-deterministic.

  was:
Most tests ignore the order of the expected / returned results, but in some cases we expect them to be in the same order (decided by
https://github.com/apache/impala/blob/e05a5323785ecb09e45bdb5dfc96533e68256175/tests/common/test_result_verifier.py#L463 )

The logic above simply checks for the presence of ORDER BY in the query,  while the results should be in a deterministic order only if there is an ORDER BY in the outermost query.
The following query caused test a failure while the rows returned were correct, just in different order:
{code}
select leftSide.id, rnk
from complextypestbl leftSide
left outer join (
    select t.id, rank() over (order by t.id) as rnk
    from complextypestbl t left outer join t.int_array
) rightSide
on leftSide.id = rightSide.id;
{code}

The ORDER BY is in an analytical function, which sorts the results, but those results are joined with a table, and the order of  rows returned by JOIN can be non-deterministic.


> RESULTS section in .test files can unnecessarily check order
> ------------------------------------------------------------
>
>                 Key: IMPALA-9080
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9080
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Csaba Ringhofer
>            Priority: Major
>              Labels: flaky-test
>
> Most tests ignore the order of the expected / returned results, but in some cases we expect them to be in the same order (decided by
> https://github.com/apache/impala/blob/e05a5323785ecb09e45bdb5dfc96533e68256175/tests/common/test_result_verifier.py#L463 )
> The logic above simply checks for the presence of ORDER BY in the query,  while the results should be in a deterministic order only if there is an ORDER BY in the outermost query.
> The following query caused a test failure while the rows returned were correct, just in different order:
> {code}
> select leftSide.id, rnk
> from complextypestbl leftSide
> left outer join (
>     select t.id, rank() over (order by t.id) as rnk
>     from complextypestbl t left outer join t.int_array
> ) rightSide
> on leftSide.id = rightSide.id;
> {code}
> The ORDER BY is in an analytical function, which sorts the results, but those results are joined with a table, and the order of  rows returned by JOIN can be non-deterministic.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org