[
https://issues.apache.org/jira/browse/IMPALA-10229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Armstrong resolved IMPALA-10229.
------------------------------------
Fix Version/s: Impala 4.0
Resolution: Fixed
Finished both subtasks
> Analytic limit pushdown optimization can be applied incorrectly based on
> predicates present
> -------------------------------------------------------------------------------------------
>
> Key: IMPALA-10229
> URL: https://issues.apache.org/jira/browse/IMPALA-10229
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Reporter: Tim Armstrong
> Assignee: Tim Armstrong
> Priority: Blocker
> Labels: correctness
> Fix For: Impala 4.0
>
>
> {noformat}
> [localhost.EXAMPLE.COM:21050] default> select * from (select month, id,
> rank() over (partition by month order by id desc) rnk from
> functional_parquet.alltypes WHERE month >= 11) v order by month, id limit 3;
> +-------+------+-----+
> | month | id | rnk |
> +-------+------+-----+
> | 11 | 6987 | 3 |
> | 11 | 6988 | 2 |
> | 11 | 6989 | 1 |
> +-------+------+-----+
> Fetched 3 row(s) in 4.16s
> {noformat}
> These are not the top 3 rows when ordering by month, id . Hive's result is
> correct:
> {noformat}
> +----------+-------+--------+
> | v.month | v.id | v.rnk |
> +----------+-------+--------+
> | 11 | 3040 | 600 |
> | 11 | 3041 | 599 |
> | 11 | 3042 | 598 |
> +----------+-------+--------+
> {noformat}
> I think when there's no select predicates, that the ordering in the analytic
> sort needs to exactly match the TOP N sort ordering. I'm not sure if there
> are fixes needed for the case where there are select predicates.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)