git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (CALCITE-2700) MaterializedView rewrite rules are matched on physical operators.


Ken Wang created CALCITE-2700:
---------------------------------

             Summary: MaterializedView rewrite rules are matched on physical operators.
                 Key: CALCITE-2700
                 URL: https://issues.apache.org/jira/browse/CALCITE-2700
             Project: Calcite
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.17.0
            Reporter: Ken Wang
            Assignee: Julian Hyde


Today, all the MV related rewrite rules can be applied to both logical and physical operators.

This will lead to many redundant matches and make the match process not efficient.

One optimization we can do is just limit the rules application to logical operators only.

 

2018-11-23 12:08:14,468 [main] INFO volcano.VolcanoRuleCall:193 - call#659: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#101:LogicalProject.NONE.[](input=rel#99:Subset#7.NONE.[],X=+($0, 1),name=$2), rel#97:LogicalFilter.NONE.[](input=rel#44:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,468 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#111 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:14,468 [main] INFO volcano.VolcanoRuleCall:218 - call#659 generated 1 successors: [LogicalProject#111]


2018-11-23 12:08:14,484 [main] INFO volcano.VolcanoRuleCall:193 - call#738: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#103:EnumerableProject.ENUMERABLE.[](input=rel#102:Subset#7.ENUMERABLE.[],X=+($0, 1),name=$2), rel#116:EnumerableFilter.ENUMERABLE.[](input=rel#44:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,484 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#118 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:14,484 [main] INFO volcano.VolcanoRuleCall:218 - call#738 generated 1 successors: [LogicalProject#118]


2018-11-23 12:08:14,499 [main] INFO volcano.VolcanoRuleCall:193 - call#626: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#100:LogicalProject.NONE.[](input=rel#99:Subset#7.NONE.[],empid=$0,deptno=$1,name=$2), rel#97:LogicalFilter.NONE.[](input=rel#44:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,499 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#127 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:14,499 [main] INFO volcano.VolcanoRuleCall:218 - call#626 generated 1 successors: [LogicalProject#127]


2018-11-23 12:08:14,515 [main] INFO volcano.VolcanoRuleCall:193 - call#216: Apply rule [MaterializedViewJoinRule(Filter)] to [rel#47:LogicalFilter.NONE.[](input=rel#46:Subset#1.NONE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,515 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#134 via MaterializedViewJoinRule(Filter)
2018-11-23 12:08:14,515 [main] INFO volcano.VolcanoRuleCall:218 - call#216 generated 1 successors: [LogicalProject#134]

2018-11-23 12:08:14,533 [main] INFO volcano.VolcanoRuleCall:193 - call#908: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#138:LogicalProject.NONE.[](input=rel#102:Subset#7.ENUMERABLE.[],X=+($0, 1),name=$2), rel#116:EnumerableFilter.ENUMERABLE.[](input=rel#44:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,534 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#141 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:14,534 [main] INFO volcano.VolcanoRuleCall:218 - call#908 generated 1 successors: [LogicalProject#141]

2018-11-23 12:08:14,535 [main] INFO volcano.VolcanoRuleCall:193 - call#878: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#137:EnumerableProject.ENUMERABLE.[](input=rel#102:Subset#7.ENUMERABLE.[],empid=$0,deptno=$1,name=$2), rel#116:EnumerableFilter.ENUMERABLE.[](input=rel#44:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,537 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#145 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:14,537 [main] INFO volcano.VolcanoRuleCall:218 - call#878 generated 1 successors: [LogicalProject#145]


2018-11-23 12:08:14,541 [main] INFO volcano.VolcanoRuleCall:193 - call#960: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#81:EnumerableProject.ENUMERABLE.[](input=rel#80:Subset#2.ENUMERABLE.[],X=+($0, 1),name=$2), rel#150:EnumerableFilter.ENUMERABLE.[](input=rel#149:Subset#1.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,542 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#152 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:14,543 [main] INFO volcano.VolcanoRuleCall:218 - call#960 generated 1 successors: [LogicalProject#152]


2018-11-23 12:08:14,544 [main] INFO volcano.VolcanoRuleCall:193 - call#966: Apply rule [MaterializedViewJoinRule(Filter)] to [rel#150:EnumerableFilter.ENUMERABLE.[](input=rel#149:Subset#1.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:14,546 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#156 via MaterializedViewJoinRule(Filter)
2018-11-23 12:08:14,546 [main] INFO volcano.VolcanoRuleCall:218 - call#966 generated 1 successors: [LogicalProject#156]


2018-11-23 12:08:15,135 [main] INFO volcano.VolcanoRuleCall:193 - call#1881: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#330:LogicalProject.NONE.[](input=rel#329:Subset#2.NONE.[],X=+($0, 1),name=$2), rel#328:LogicalFilter.NONE.[](input=rel#327:Subset#1.NONE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:15,136 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#364 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:15,138 [main] INFO volcano.VolcanoRuleCall:218 - call#1881 generated 1 successors: [LogicalProject#364]


2018-11-23 12:08:15,173 [main] INFO volcano.VolcanoRuleCall:193 - call#2282: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#382:LogicalProject.NONE.[](input=rel#380:Subset#7.NONE.[],X=+($0, 1),name=$2), rel#378:LogicalFilter.NONE.[](input=rel#325:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:15,174 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#392 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:15,174 [main] INFO volcano.VolcanoRuleCall:218 - call#2282 generated 1 successors: [LogicalProject#392]

2018-11-23 12:08:15,206 [main] INFO volcano.VolcanoRuleCall:193 - call#2249: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#381:LogicalProject.NONE.[](input=rel#380:Subset#7.NONE.[],empid=$0,deptno=$1,name=$2), rel#378:LogicalFilter.NONE.[](input=rel#325:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:15,207 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#408 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:15,208 [main] INFO volcano.VolcanoRuleCall:218 - call#2249 generated 1 successors: [LogicalProject#408]

2018-11-23 12:08:15,248 [main] INFO volcano.VolcanoRuleCall:193 - call#2531: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#419:LogicalProject.NONE.[](input=rel#383:Subset#7.ENUMERABLE.[],X=+($0, 1),name=$2), rel#397:EnumerableFilter.ENUMERABLE.[](input=rel#325:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:15,250 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#422 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:15,250 [main] INFO volcano.VolcanoRuleCall:218 - call#2531 generated 1 successors: [LogicalProject#422]


2018-11-23 12:08:15,251 [main] INFO volcano.VolcanoRuleCall:193 - call#2501: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#418:EnumerableProject.ENUMERABLE.[](input=rel#383:Subset#7.ENUMERABLE.[],empid=$0,deptno=$1,name=$2), rel#397:EnumerableFilter.ENUMERABLE.[](input=rel#325:Subset#0.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:15,252 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#426 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:15,253 [main] INFO volcano.VolcanoRuleCall:218 - call#2501 generated 1 successors: [LogicalProject#426]


2018-11-23 12:08:15,267 [main] INFO volcano.VolcanoRuleCall:193 - call#2583: Apply rule [MaterializedViewJoinRule(Project-Filter)] to [rel#362:EnumerableProject.ENUMERABLE.[](input=rel#361:Subset#2.ENUMERABLE.[],X=+($0, 1),name=$2), rel#431:EnumerableFilter.ENUMERABLE.[](input=rel#430:Subset#1.ENUMERABLE.[],condition==(CAST($1):INTEGER NOT NULL, 10))]
2018-11-23 12:08:15,269 [main] INFO volcano.VolcanoRuleCall:91 - Transform to: rel#433 via MaterializedViewJoinRule(Project-Filter)
2018-11-23 12:08:15,269 [main] INFO volcano.VolcanoRuleCall:218 - call#2583 generated 1 successors: [LogicalProject#433]



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