WeiZhong94 commented on a change in pull request #9874: [FLINK-14240][table] Merge table config parameters into the global job parameters for legacy planner to align with blink planner URL: https://github.com/apache/flink/pull/9874#discussion_r353568517
########## File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/util/GlobalJobParametersMerger.java ########## @@ -0,0 +1,42 @@ +/* + * 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.util; + +import org.apache.flink.api.common.ExecutionConfig; +import org.apache.flink.configuration.Configuration; +import org.apache.flink.table.api.TableConfig; + +/** + * Utilities for merging the table config parameters and global job parameters. + */ +public class GlobalJobParametersMerger { + + private GlobalJobParametersMerger() {} + + /** + * Merge global job parameters and table config parameters, + * and set the merged result to GlobalJobParameters. + */ + public static void mergeParameters(ExecutionConfig executionConfig, TableConfig tableConfig) { + Configuration parameters = new Configuration(); + parameters.addAll(tableConfig.getConfiguration()); Review comment: Thanks for your reply @twalthr. I have taken a quick look at the implementation of FLIP-59. It seems that I need to pass the value in `tableConfig. getConfiguration().getOptional(PipelineOptions.GLOBAL_JOB_PARAMETERS)` to `executionConfig.configure()`. IMHO it would be better if the global job parameter is configured with other config options together, but it seems that passing all items in `tableConfig.getConfiguration()` to `ExecutionConfig` exceeds the scope of this PR. Is there any plan for this or have I missed something? ---------------------------------------------------------------- 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