[ 
https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

LakeShen updated CALCITE-6009:
------------------------------
    Description: 
In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`.

When the Limit' source row number is less than the Limit's fetch,we could 
remove the the redundant Limit.

For example:
{code:java}
SELECT * FROM (VALUES 1,2,3,4,5,6) AS t1 LIMIT 10 {code}
Bec

  was:
In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`.

When the Limit' source row number is less than the Limit's fetch,we could 
remove theĀ 


> Add the optimize for removing the redundant Limit when a Limit's input max 
> row cnt less than limit fetch
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6009
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6009
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: LakeShen
>            Priority: Major
>
> In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 
> 5]`.
> When the Limit' source row number is less than the Limit's fetch,we could 
> remove the the redundant Limit.
> For example:
> {code:java}
> SELECT * FROM (VALUES 1,2,3,4,5,6) AS t1 LIMIT 10 {code}
> Bec



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

Reply via email to