[
https://issues.apache.org/jira/browse/CALCITE-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946964#comment-14946964
]
Jesus Camacho Rodriguez commented on CALCITE-889:
-------------------------------------------------
[~pxiong], patch looks good now, thanks! I still have a couple of comments:
- Please, move the following condition to the {{matches}} method of the rule:
{noformat}
// It is not valid to apply the rule if
// Union.all is false;
// or Sort.offset is not null
// or Sort.fetch is null.
if (!union.all || sort.offset != null || sort.fetch == null) {
return;
}
{noformat}
This should improve performance when many rules are being applied, as the rule
won't fire up.
- Could we provide a public constructor whose input parameters are the classes
to match e.g. as in SortJoinTransposeRule? Then the INSTANCE final static
object will receive as parameters the concrete instances. This should avoid
that in the future we need to revisit the rule if we want it to match different
subclasses.
> 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, CALCITE-889.02.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)