[ https://issues.apache.org/jira/browse/CALCITE-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16793427#comment-16793427 ]
Chunwei Lei edited comment on CALCITE-2658 at 3/15/19 8:03 AM: --------------------------------------------------------------- [~zabetak] Thanks. I really appreciate it much if someone can have a look. was (Author: chunwei lei): [~zabetak] Thanks. I really appreciate it very much if someone can have a look. > Introducing more ReduceExpressionRules > -------------------------------------- > > Key: CALCITE-2658 > URL: https://issues.apache.org/jira/browse/CALCITE-2658 > Project: Calcite > Issue Type: Bug > Components: core > Reporter: Chunwei Lei > Assignee: Julian Hyde > Priority: Major > Labels: pull-request-available > Time Spent: 1h 40m > Remaining Estimate: 0h > > 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)