Jark Wu created FLINK-17887:
-------------------------------
Summary: Improve interface of ScanFormatFactory and SinkFormatFactory
Key: FLINK-17887
URL:
https://issues.apache.org/jira/browse/FLINK-17887 Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Jark Wu
Fix For: 1.11.0
There is some problem with current ScanForamtFactory and SinkFormatFactory interfaces:
1) {{ScanFormat#createScanFormat}} only accepts {{ScanTableSource.Context}}, which means it can’t work in lookup source.
2) The naming of {{ScanFormat}} also indicates it is only used in scan source. But a lookup source should be able to work with format too.
3) It’s confusing that {{ScanFormatFactory#createScanFormat}} and {{ScanFormat#createScanFormat}} (create itself?)
The proposed new interface strucutre:
{code:java}
interface DeserializationFormatFactory {
DeserializationSchemaProvider createDeserializationSchemaProvider(
DynamicTableFactory.Context context, ReadableConfig formatOptions);
}
interface SerializationFormatFactory {
SerializationSchemaProvider createSerializationSchemaProvider(
DynamicTableFactory.Context context, ReadableConfig formatOptions);
}
interface DeserializationSchemaProvider {
DeserializationSchema createDeserializationSchema(
DynamicTableSource.Context context, DataType producedDataType)
}
interface SerializationSchemaProvider{
SerializationSchema createSerializationSchema(
DynamicTableSink.Context context, DataType consumedDataType);
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)