You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/05/27 09:16:00 UTC

[jira] [Commented] (FLINK-17887) Improve interface of ScanFormatFactory and SinkFormatFactory

    [ https://issues.apache.org/jira/browse/FLINK-17887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17117565#comment-17117565 ] 

Jark Wu commented on FLINK-17887:
---------------------------------

I upgrade the priority to BLOCKER, because the current public interface has problem. We shouldn't release halfway interface. 

> 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
>            Assignee: Jark Wu
>            Priority: Blocker
>              Labels: pull-request-available
>             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}
> The top-level user-facing interfaces are still {{DeserializationFormatFactory}} and {{SerializationFormatFactory}}. This is also good for future evolution, e.g. introducing new {{EncoderFormatFactory}} and {{DecoderFormatFactory}} if we have a new runtime {{Encoder}} {{Decoder}} in the future. This also solves our concerns: no concepts of SourceFormat and SinkFormat .



--
This message was sent by Atlassian Jira
(v8.3.4#803005)