godfreyhe commented on a change in pull request #9203: [FLINK-13375][table-api] 
Improve config names in ExecutionConfigOptions and OptimizerConfigOptions
URL: https://github.com/apache/flink/pull/9203#discussion_r307095535
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/config/OptimizerConfigOptions.java
 ##########
 @@ -0,0 +1,88 @@
+/*
+ * 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.api.config;
+
+import org.apache.flink.configuration.ConfigOption;
+
+import static org.apache.flink.configuration.ConfigOptions.key;
+
+/**
+ * This class holds configuration constants used by Flink's table planner 
module.
+ */
+public class OptimizerConfigOptions {
+
+       // 
------------------------------------------------------------------------
+       //  Optimizer Options
+       // 
------------------------------------------------------------------------
+       public static final ConfigOption<String> 
TABLE_OPTIMIZER_AGG_PHASE_STRATEGY =
+                       key("table.optimizer.agg-phase-strategy")
+                                       .defaultValue("AUTO")
+                                       .withDescription("Strategy for 
aggregate phase. Only AUTO, TWO_PHASE or ONE_PHASE can be set.\n" +
+                                                       "AUTO: No special 
enforcer for aggregate stage. Whether to choose two stage aggregate or one" +
+                                                       " stage aggregate 
depends on cost. \n" +
+                                                       "TWO_PHASE: Enforce to 
use two stage aggregate which has localAggregate and globalAggregate. " +
+                                                       "Note that if aggregate 
call does not support optimize into two phase, we will still use one stage 
aggregate.\n" +
+                                                       "ONE_PHASE: Enforce to 
use one stage aggregate which only has CompleteGlobalAggregate.");
+
+       public static final ConfigOption<Long> 
TABLE_OPTIMIZER_BROADCAST_JOIN_THRESHOLD =
+                       key("table.optimizer.join.broadcast-threshold")
+                                       .defaultValue(1024 * 1024L)
+                                       .withDescription("Configures the 
maximum size in bytes for a table that will be broadcast to all worker " +
+                                                       "nodes when performing 
a join. By setting this value to -1 to disable broadcasting.");
+
+       public static final ConfigOption<Boolean> 
TABLE_OPTIMIZER_DISTINCT_AGG_SPLIT_ENABLED =
+                       key("table.optimizer.distinct-agg.split.enabled")
+                                       .defaultValue(false)
+                                       .withDescription("Tells the optimizer 
whether to split distinct aggregation " +
+                                                       "(e.g. COUNT(DISTINCT 
col), SUM(DISTINCT col)) into two level. " +
+                                                       "The first aggregation 
is shuffled by an additional key which is calculated using " +
+                                                       "the hashcode of 
distinct_key and number of buckets. This optimization is very useful " +
+                                                       "when there is data 
skew in distinct aggregation and gives the ability to scale-up the job. " +
+                                                       "Default is false.");
+
+       public static final ConfigOption<Integer> 
TABLE_OPTIMIZER_DISTINCT_AGG_SPLIT_BUCKET_NUM =
+                       key("table.optimizer.distinct-agg.split.bucket-num")
+                                       .defaultValue(1024)
+                                       .withDescription("Configure the number 
of buckets when splitting distinct aggregation. " +
+                                                       "The number is used in 
the first level aggregation to calculate a bucket key " +
+                                                       
"'hash_code(distinct_key) % BUCKET_NUM' which is used as an additional group 
key after splitting.");
+
+       public static final ConfigOption<Boolean> 
TABLE_OPTIMIZER_REUSE_SUB_PLAN_ENABLED =
+                       key("table.optimizer.reuse-sub-plan-enabled")
+                                       .defaultValue(true)
+                                       .withDescription("When it is true, 
optimizer will try to find out duplicated " +
+                                                       "sub-plan and reuse 
them.");
+
+       public static final ConfigOption<Boolean> 
TABLE_OPTIMIZER_REUSE_SOURCE_ENABLED =
+                       key("table.optimizer.reuse-source-enabled")
+                                       .defaultValue(true)
+                                       .withDescription("When it is true, 
optimizer will try to find out duplicated table source and " +
+                                                       "reuse them. This works 
only when " + TABLE_OPTIMIZER_REUSE_SUB_PLAN_ENABLED.key() + " is true.");
+
+       public static final ConfigOption<Boolean> 
TABLE_OPTIMIZER_SOURCE_PREDICATE_PUSHDOWN_ENABLED =
+                       key("table.optimizer.source.predicate-pushdown-enabled")
+                                       .defaultValue(true)
+                                       .withDescription("If it is true, the 
optimizer will push down predicates to the FilterableTableSource. " +
 
 Review comment:
   When it is true, the optimizer will push down predicates into the 
FilterableTableSource. ... ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to