[
https://issues.apache.org/jira/browse/FLINK-20263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Walther reassigned FLINK-20263:
------------------------------------
Assignee: Timo Walther
> Improve exception when metadata name mismatch
> ---------------------------------------------
>
> Key: FLINK-20263
> URL: https://issues.apache.org/jira/browse/FLINK-20263
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.12.0
> Reporter: Dawid Wysakowicz
> Assignee: Timo Walther
> Priority: Critical
> Fix For: 1.12.0
>
>
> I'd suggest to slightly improve the exception message when there is a
> mismatch in the field name. It would be nice to provide with an example of a
> valid syntax.
> I used:
> {code}
> tstmp TIMESTAMP(3) METADATA,
> {code}
> Right now we get:
> {code}
> org.apache.flink.table.api.ValidationException: Invalid metadata key 'tstmp'
> in column 'tstmp' of table
> 'default_catalog.default_database.pageviews_per_region'. The DynamicTableSink
> class 'org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink'
> supports the following metadata keys for writing:
> headers
> timestamp
> {code}
> would be nice to have something like:
> {code}
> org.apache.flink.table.api.ValidationException: Invalid metadata key 'tstmp'
> in column 'tstmp' of table
> 'default_catalog.default_database.pageviews_per_region'. The DynamicTableSink
> class 'org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink'
> supports the following metadata keys for writing:
> headers
> timestamp
> Example:
> tstmp TIMESTAMP(3) METADATA FROM 'headers' -- I think it would be fine to
> simply pick up the first key, I understand it would be hard to derive the
> desired property
> {code}
> This would let users easier figure out the error in the syntax. I might've
> copied the example from somewhere, because of being lazy and I might not be
> aware of the other syntax. It would be hard for me to figure out what is the
> problem from the original exception.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)