Steve Carlin created IMPALA-14469:
-------------------------------------

             Summary: Calcite Planner: top-n optimization not working with 
constant in order by
                 Key: IMPALA-14469
                 URL: https://issues.apache.org/jira/browse/IMPALA-14469
             Project: IMPALA
          Issue Type: Sub-task
            Reporter: Steve Carlin


After IMPALA-14415 gets committed, there is still a problem in the 

limit-pushdown-analytic-calcite.test file (which will be marked with this Jira 
number)

The first order by expression is a constant.  Since this matches the analytic 
expression, we should be able to use top-n optimization.

Instead, what is happening in the code is that the constant is optimized out in 
the sort expression but not in the analytic expression.  So the top-n 
optimization is not kicking in.

Pushing this out of the v1 cut because this is an edge case.  The workaround is 
to remove the constant from the order by expression which is essentially a nop.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to