[
https://issues.apache.org/jira/browse/CALCITE-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688058#comment-16688058
]
Chunwei Lei commented on CALCITE-2658:
--------------------------------------
[~julianhyde] Sorry for the late reply.
Does using traits rather than structurally matching particular kinds of RelNode
mean the rule should match all kinds of RelNode and use matches method to
decide the expected RelNode?
I am not sure whether i really understand your idea. Actually In our use case,
we just add ExchangeRemoveConstantKeysRule and
SortExchangeRemoveConstantKeysRule just like
[PR#921|https://github.com/apache/calcite/pull/921]. Does this have any
disadvantage?
Looking forward to your reply.
> Introducing more ReduceExpressionRules
> --------------------------------------
>
> Key: CALCITE-2658
> URL: https://issues.apache.org/jira/browse/CALCITE-2658
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.17.0
> Reporter: Chunwei Lei
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.18.0
>
>
> It is useful to have rules reducing Exchange/Sort/SortExchange keys, e.g.,
> SELECT key,value FROM (SELECT 1 AS key, value FROM src) r DISTRIBUTE BY key;
> can be reduced to
> SELECT 1 AS key, value FROM src; # Since singleton requirement may already
> required by SELECT.
> SELECT key,value FROM (SELECT 1 AS key, value FROM src) r ORDER BY key;
> can be reduced to
> SELECT 1 AS key, value FROM src; # Since ordering on constant is useless.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)