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 "Aman Sinha (Jira)" <ji...@apache.org> on 2020/08/06 00:08:00 UTC
[jira] [Commented] (IMPALA-2783) Push down filters on rank similar
to limit
[ https://issues.apache.org/jira/browse/IMPALA-2783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17171846#comment-17171846 ]
Aman Sinha commented on IMPALA-2783:
------------------------------------
This can be added on top of the changes for IMPALA-9983. Assigning it to self.
> Push down filters on rank similar to limit
> ------------------------------------------
>
> Key: IMPALA-2783
> URL: https://issues.apache.org/jira/browse/IMPALA-2783
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.2
> Reporter: Mostafa Mokhtar
> Assignee: Aman Sinha
> Priority: Minor
> Labels: performance, planner, ramp-up
>
> Similar to limit push down optimization we should extend the rule to cover filters on Rank(), dense_rank() etc... as users tend to have explicit filters on RANK()
> Query
> {code}
> select *
> FROM (SELECT Rank()
> OVER(
> ORDER BY l_orderkey) AS rank
> FROM lineitem
> WHERE l_shipdate < '1992-05-09') a
> WHERE rank < 10
> {code}
> Plan
> {code}
> +--------------------------------------------------------------+
> | Explain String |
> +--------------------------------------------------------------+
> | Estimated Per-Host Requirements: Memory=512.00MB VCores=1 |
> | |
> | 03:SELECT |
> | | predicates: rank() < 10 |
> | | hosts=9 per-host-mem=unavailable |
> | | tuple-ids=6,5 row-size=50B cardinality=17999891 |
> | | |
> | 02:ANALYTIC |
> | | functions: rank() |
> | | order by: l_orderkey ASC |
> | | window: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW |
> | | hosts=9 per-host-mem=unavailable |
> | | tuple-ids=6,5 row-size=50B cardinality=179998909 |
> | | |
> | 04:MERGING-EXCHANGE [UNPARTITIONED] |
> | | order by: l_orderkey ASC |
> | | hosts=9 per-host-mem=unavailable |
> | | tuple-ids=6 row-size=38B cardinality=179998909 |
> | | |
> | 01:SORT |
> | | order by: l_orderkey ASC |
> | | hosts=9 per-host-mem=336.00MB |
> | | tuple-ids=6 row-size=38B cardinality=179998909 |
> | | |
> | 00:SCAN HDFS [tpch_300_parquet.lineitem, RANDOM] |
> | partitions=1/1 files=264 size=64.36GB |
> | predicates: l_shipdate < '1992-05-09' |
> | table stats: 1799989091 rows total |
> | column stats: all |
> | hosts=9 per-host-mem=176.00MB |
> | tuple-ids=0 row-size=38B cardinality=179998909 |
> +--------------------------------------------------------------+
> {code}
--
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