[ 
https://issues.apache.org/jira/browse/CALCITE-7222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18029265#comment-18029265
 ] 

Zhen Chen commented on CALCITE-7222:
------------------------------------

The current issue is that the FETCH and OFFSET are lost in the SORT after this 
rule transformation. I mistakenly used  relBuilder.sort  when generating the 
new SORT—it should have been  relBuilder.sortLimit .

> SortRemoveDuplicateKeysRule miss fetch and offset information
> -------------------------------------------------------------
>
>                 Key: CALCITE-7222
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7222
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: weihua zhang
>            Assignee: Zhen Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.41.0
>
>
> {code:sql}
> !use scott
> !set planner-rules "
> +CoreRules.SORT_REMOVE_DUPLICATE_KEYS"
> select * from (select empno as a, empno as b from emp) t order by a, b limit 
> 1;
> !ok
> {code}



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

Reply via email to