Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3829#discussion_r136130122 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/queryConfig.scala --- @@ -19,9 +19,21 @@ package org.apache.flink.table.api import _root_.java.io.Serializable + import org.apache.flink.api.common.time.Time -class QueryConfig private[table] extends Serializable {} +class QueryConfig private[table] extends Serializable { +} + +object QueryConfig { + def getQueryConfigFromTableEnv(tableEnv: TableEnvironment): QueryConfig = { --- End diff -- I thought about this before. I did not add `TableEnvironment.queryConfig: QueryConfig` because users would always have to cast `QueryConfig` to `StreamQueryConfig` in order to use it. Instead there is a `queryConfig` method for `StreamTableEnvironment` which returns a `StreamQueryConfig`. I would not like to expose the static creation method to users. How about we add this method to `TableEnvironment`: private[flink] def queryConfig: QueryConfig = this match { case _: BatchTableEnvironment => new BatchQueryConfig case _: StreamTableEnvironment => new StreamQueryConfig } The method can be overridden by `StreamTableEnvironment` as ``` override def queryConfig: StreamQueryConfig = new StreamQueryConfig ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---