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 "Tim Armstrong (Jira)" <ji...@apache.org> on 2020/10/27 16:26:00 UTC
[jira] [Updated] (IMPALA-10229) Analytic limit pushdown
optimization can be applied incorrectly based on predicates present
[ https://issues.apache.org/jira/browse/IMPALA-10229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Armstrong updated IMPALA-10229:
-----------------------------------
Summary: Analytic limit pushdown optimization can be applied incorrectly based on predicates present (was: Analytic limit pushdown optimization can be applied incorrect when there are no analytic predicates)
> 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
>
> {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)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org