godfreyhe commented on a change in pull request #11296: [FLINK-16363] [table] Correct the execution behavior of TableEnvironment and StreamTableEnvironment URL: https://github.com/apache/flink/pull/11296#discussion_r389256028
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/util/DummyStreamExecutionEnvironment.java ########## @@ -0,0 +1,298 @@ +/* + * 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.api.common.JobExecutionResult; +import org.apache.flink.api.common.cache.DistributedCache; +import org.apache.flink.api.common.restartstrategy.RestartStrategies; +import org.apache.flink.api.dag.Transformation; +import org.apache.flink.api.java.tuple.Tuple2; +import org.apache.flink.runtime.state.AbstractStateBackend; +import org.apache.flink.runtime.state.StateBackend; +import org.apache.flink.streaming.api.CheckpointingMode; +import org.apache.flink.streaming.api.TimeCharacteristic; +import org.apache.flink.streaming.api.environment.CheckpointConfig; +import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; +import org.apache.flink.streaming.api.graph.StreamGraph; +import org.apache.flink.table.api.TableEnvironment; +import org.apache.flink.table.delegation.Planner; +import org.apache.flink.table.sinks.StreamTableSink; +import org.apache.flink.table.sources.StreamTableSource; + +import com.esotericsoftware.kryo.Serializer; + +import java.io.Serializable; +import java.util.List; + +/** + * This is dummy {@link StreamExecutionEnvironment}, which holds a real {@link StreamExecutionEnvironment}, + * shares all configurations of the real environment, and disables all configuration setting methods. + * + * <p>When translating relational plan to execution plan in the {@link Planner}, the generated {@link Transformation}s + * will be added into the StreamExecutionEnvironment's buffer, and they will be cleared only when Review comment: as explained in the class doc, this is a temporary solution, and this class will be removed once `StreamTableSource` and `StreamTableSink` are reworked. @twalthr and @dawidwys are working on this. ---------------------------------------------------------------- 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