[
https://issues.apache.org/jira/browse/CALCITE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14876080#comment-14876080
]
Pengcheng Xiong commented on CALCITE-889:
-----------------------------------------
[~jcamachorodriguez], thanks for your constructive comments. I agree with most
of them and I will modify accordingly. Just one correctness issue that we may
need discussion. So you suggested "If it is, we would replace it with a copy of
the top Sort operator." Let's say we have table A, B with columns (col0 int,
col1 int). A's rows are ((1,2),(2,1)) B's row is (1,3). And the original plan
is like this. The output should be (1,2)
{code}
Sort by col1, limit 1
Union
Sort by col0, limit 1
Scan A
Sort by col1, limit 1
Scan B
{code}
If we replace it with a copy of the top Sort operator
{code}
Sort by col1, limit 1
Union
Sort by col1, limit 1
Scan A
Sort by col1, limit 1
Scan B
{code}
The output should be (2,1). Could you double check if my understanding is
wrong? Thanks.
> Implement SortUnionTransposeRule
> --------------------------------
>
> Key: CALCITE-889
> URL: https://issues.apache.org/jira/browse/CALCITE-889
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Pengcheng Xiong
> Assignee: Julian Hyde
> Attachments: CALCITE-889.01.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)