You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (JIRA)" <ji...@apache.org> on 2018/11/07 08:00:00 UTC
[jira] [Commented] (CALCITE-2658) Introducing more
ReduceExpressionRules
[ https://issues.apache.org/jira/browse/CALCITE-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677799#comment-16677799 ]
Stamatis Zampetakis commented on CALCITE-2658:
----------------------------------------------
I am not sure about adding more ReduceExpressionRules. So far ReduceExpressionRules are performing reductions over RexNode trees. It appears that you want to apply simplifications across RelNodes. Is this the case?
For the case of Sort have you checked the SortRemoveConstantKeysRule?
> 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)