You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "godfrey he (JIRA)" <ji...@apache.org> on 2019/05/10 12:07:00 UTC

[jira] [Updated] (FLINK-12487) Introduce planner rules to rewrite expression and merge calc

     [ https://issues.apache.org/jira/browse/FLINK-12487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

godfrey he updated FLINK-12487:
-------------------------------
    Description: 
This issue aims to introduce planner rules to rewrite expression and merge calc, rules include:
1. {{ConvertToNotInOrInRule}}, that converts a cascade of predicates to [[IN]] or [[NOT_IN]],
e.g. 
 converts predicate {{(x = 1 OR x = 2 OR x = 3 OR x = 4) AND y = 5}} to predicate {{x IN (1, 2, 3, 4) AND y = 5}}
 converts predicate {{(x <> 1 AND x <> 2 AND x <> 3 AND x <> 4) AND y = 5}} to predicate {{x NOT IN (1, 2, 3, 4) AND y = 5}}
2. {{RewriteCoalesceRule}}, that rewrites {{Coalesce}} to {{Case When}}
3. {{FlinkCalcMergeRule}}, that is copied from Calcite {{CalcMergeRule}}, and it will simplify the merged program

  was:
This issue aims to introduce planner rules to rewrite expression and merge calc, rules include:
1. {{ConvertToNotInOrInRule}}, that converts a cascade of predicates to [[IN]] or [[NOT_IN]],
e.g. 
 convert predicate: {{(x = 1 OR x = 2 OR x = 3 OR x = 4) AND y = 5}} to predicate: {{x IN (1, 2, 3, 4) AND y = 5}}
convert predicate: {{(x <> 1 AND x <> 2 AND x <> 3 AND x <> 4) AND y = 5}} to predicate: {{x NOT IN (1, 2, 3, 4) AND y = 5}}
2. {{RewriteCoalesceRule}}, that rewrite {{Coalesce}} to {{Case When}}
3. {{FlinkCalcMergeRule}}, that is copied from Calcite {{CalcMergeRule}}, and simplifies the merged program


> Introduce planner rules to rewrite expression and merge calc
> ------------------------------------------------------------
>
>                 Key: FLINK-12487
>                 URL: https://issues.apache.org/jira/browse/FLINK-12487
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table SQL / Planner
>            Reporter: godfrey he
>            Assignee: godfrey he
>            Priority: Major
>
> This issue aims to introduce planner rules to rewrite expression and merge calc, rules include:
> 1. {{ConvertToNotInOrInRule}}, that converts a cascade of predicates to [[IN]] or [[NOT_IN]],
> e.g. 
>  converts predicate {{(x = 1 OR x = 2 OR x = 3 OR x = 4) AND y = 5}} to predicate {{x IN (1, 2, 3, 4) AND y = 5}}
>  converts predicate {{(x <> 1 AND x <> 2 AND x <> 3 AND x <> 4) AND y = 5}} to predicate {{x NOT IN (1, 2, 3, 4) AND y = 5}}
> 2. {{RewriteCoalesceRule}}, that rewrites {{Coalesce}} to {{Case When}}
> 3. {{FlinkCalcMergeRule}}, that is copied from Calcite {{CalcMergeRule}}, and it will simplify the merged program



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)