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

Sylvain Crozon commented on CALCITE-4617:
-----------------------------------------

I believe the fix is quite straightforward for this, I submitted a PR: 
[https://github.com/apache/calcite/pull/2417]

 

But not sure if there are use cases I'm not thinking of where this fix wouldn't 
work

> Wrong offset when SortJoinTransposeRule pushes a sort node with an offset
> -------------------------------------------------------------------------
>
>                 Key: CALCITE-4617
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4617
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Sylvain Crozon
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{The SortJoinTransposeRule will push a sort node past a join, and then 
> duplicate the sort node on top of the join. }}
> When the sort node has an offset, we should only apply it once, otherwise we 
> end up skipping twice as many rows as we should. The sort node added on top 
> of the join should have a null offset.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to