Quanlong Huang created IMPALA-15189:
---------------------------------------
Summary: HBO for computing SortNode cardinality
Key: IMPALA-15189
URL: https://issues.apache.org/jira/browse/IMPALA-15189
Project: IMPALA
Issue Type: New Feature
Reporter: Quanlong Huang
Assignee: Quanlong Huang
A sort only reorders rows, so its output row count equals its child's *unless*
it applies a limit: TopN, Partitioned TopN, or a total sort carrying a LIMIT.
For instance, the SortNode created for the following analytic function is a
Partitioned TopN:
{code:sql}
select ..., rank() over (partition by a order by b) rnk ... where rnk < 5"{code}
Its output cardinality depends on the distinct number of column a and the
per-partition limit 5.
HBO should track cardinality for SortNodes when they are not
cardinality-preserving.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)