flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5406) add normalization phase for predicate logical plan rewriting between decorrelate query phase and volcano optimization phase
Date Thu, 26 Jan 2017 14:04:24 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15839714#comment-15839714

ASF GitHub Bot commented on FLINK-5406:

Github user twalthr commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/RuleSetConfig.scala
    @@ -0,0 +1,140 @@
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.flink.table.calcite
    +import org.apache.calcite.plan.RelOptRule
    +import org.apache.calcite.tools.{RuleSet, RuleSets}
    +import org.apache.flink.util.Preconditions
    +import scala.collection.JavaConverters._
    +  * Builder for creating a RuleSet configuration.
    +  */
    +class RuleSetConfigBuilder {
    --- End diff --
    I think we don't need a builder in a builder. Can we integrate `RuleSetConfigBuilder`
in `CalciteConfigBuilder`?

> add normalization phase for predicate logical plan rewriting between decorrelate query
phase and volcano optimization phase
> ---------------------------------------------------------------------------------------------------------------------------
>                 Key: FLINK-5406
>                 URL: https://issues.apache.org/jira/browse/FLINK-5406
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: godfrey he
>            Assignee: godfrey he
> Normalization phase is for predicate logical plan rewriting and is independent of cost
module. The rules in normalization phase do not need to repeatedly applied to different logical
plan which is different to volcano optimization phase. And the benefit of normalization phase
is to reduce the running time of volcano planner.
> *ReduceExpressionsRule* can apply various simplifying transformations on RexNode trees.
Currently, there are two transformations:
> 1) Constant reduction, which evaluates constant subtrees, replacing them with a corresponding
> 2) Removal of redundant casts, which occurs when the argument into the cast is the same
as the type of the resulting cast expression
> the above transformations do not depend on the cost module,  so we can move the rules
in *ReduceExpressionsRule* from DATASET_OPT_RULES/DATASTREAM_OPT_RULES to DataSet/DataStream
Normalization Rules.

This message was sent by Atlassian JIRA

View raw message