twalthr commented on a change in pull request #8050: [FLINK-11067][table]
Convert TableEnvironments to interfaces
URL: https://github.com/apache/flink/pull/8050#discussion_r278074006
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/factories/StreamTableSinkFactory.scala
##########
@@ -20,15 +20,15 @@ package org.apache.flink.table.factories
import java.util
-import org.apache.flink.table.sinks.StreamTableSink
+import org.apache.flink.table.sinks.{StreamTableSink, TableSink}
/**
* A factory to create configured table sink instances in a streaming
environment based on
- * string-based properties. See also [[TableFactory]] for more information.
+ * string-based properties. See also [[TableSinkFactory]] for more
information.
*
* @tparam T type of records that the factory consumes
*/
-trait StreamTableSinkFactory[T] extends TableFactory {
+trait StreamTableSinkFactory[T] extends TableSinkFactory[T] {
Review comment:
We had this discussions in the past when creating FLIP-32. I cite the
important parts:
"Currently, we cannot add interfaces for connectors into the common module
as classes such as `StreamTableSource` or `BatchTableSource` require a
dependency to `DataStream` or `DataSet` API classes. This might change in the
future once we reworked our TableSource and TableSink interfaces. For now,
extension points for connectors are located in `flink-table-api-*-bridge` and
tightly integrate with the target API."
`StreamTableSource` and sink use the Java version of the DataStream API,
thus, those two interfaces belong into a Java bridge. If users want to
implement a Java source and use the Scala Table API, they can simply add both
modules. This is not a problem because classes in both bridging modules are
prefixed with `api.java` or `api.scala` or do not have class name clashes.
In the near future we will deprecate those interfaces and have just one
unified interface in `common` that does not depend in DataStream API anymore
but returns a `SourceFunction`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services