Dawid Wysakowicz created FLINK-20263:
----------------------------------------
Summary: Improve exception when metada name mismath
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
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.
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 'timestamp'
{code}
This would let users easier figure out the error in the syntax.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)