[ https://issues.apache.org/jira/browse/CALCITE-1182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225420#comment-15225420 ]
Julian Hyde commented on CALCITE-1182: -------------------------------------- Can you mention in the javadoc why FilterToProjectUnifyRule1 is needed in addition to FilterToProjectUnifyRule; and similarly FilterToFilterUnifyRule1. I can't see any way to reduce redundancy. Also, can you reduce the indentation level of the strings you added to MaterlalizationTest. These days, if I am passing multi-line string constants to functions I often put them in variables: {noformat} final String materialize = ...; final String query = ...; checkMaterialize(materialize, query); {noformat} Otherwise +1 > Add ProjectRemoveRule to pre-processing program of materialization > substitution > ------------------------------------------------------------------------------- > > Key: CALCITE-1182 > URL: https://issues.apache.org/jira/browse/CALCITE-1182 > Project: Calcite > Issue Type: Improvement > Components: core > Reporter: Maryann Xue > Assignee: Maryann Xue > Priority: Minor > Labels: materializedviews, phoenix > > In VolcanoPlanner, we apply a simple pre-processing hep program to normalize > the "target" and "query" rels before materialization substitution. Currently > this program runs with two rules: FilterProjectTransposeRule and > ProjectMergeRule. > We need an extra rule ProjectRemoveRule for the Phoenix use case where a > secondary index (modeled as materialized views) is defined on a view so the > materialized view "queryRel" may have an identity projection introduced by > this view. -- This message was sent by Atlassian JIRA (v6.3.4#6332)