[
https://issues.apache.org/jira/browse/FLINK-16465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053407#comment-17053407
]
Leonard Xu commented on FLINK-16465:
------------------------------------
Hi, [~hehuiyuan]
Thanks for your reports. Although `UpserStreamTableSink` extends from
`TableSink` and need to implement these methods in TableSink by default, +1 for
this Wish from my side, we can have a more detailed document to help user take
off easily.
> Add more detailed instructions for TableSink
> --------------------------------------------
>
> Key: FLINK-16465
> URL: https://issues.apache.org/jira/browse/FLINK-16465
> Project: Flink
> Issue Type: Wish
> Components: Documentation
> Reporter: hehuiyuan
> Priority: Minor
>
> That has a error when I define a UpserStreamTableSink without getTableSchem
> method or getFieldsNames/getFields methods.
> Some instructions are added that may be better.
> [https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/sourceSinks.html#upsertstreamtablesink]
> {code:java}
> Exception in thread "main" org.apache.flink.table.api.TableException: Table
> sink does not implement a table schema.
> at org.apache.flink.table.sinks.TableSink.getTableSchema(TableSink.java:75)
> at
> org.apache.flink.table.api.internal.TableEnvironmentImpl.registerTableSink(TableEnvironmentImpl.java:215)
> at
> com.jd.flink.sql.writer.console.ConsoleUpsertWriter.initWriter(ConsoleUpsertWriter.java:40)
> at com.jd.flink.sql.writer.Writer.registWriter(Writer.java:33)
> at com.jd.flink.sql.test.MainClassTest_hhy.main(MainClassTest_hhy.java:222)
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)