You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Timo Walther (Jira)" <ji...@apache.org> on 2022/04/04 12:10:00 UTC
[jira] [Closed] (FLINK-26712) Metadata keys should not conflict with physical columns
[ https://issues.apache.org/jira/browse/FLINK-26712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther closed FLINK-26712.
--------------------------------
Fix Version/s: 1.15.0
Resolution: Fixed
Fixed in master: 0097b5a6faed4a2b146dca81f4d92e08c5c96897
Fixed in 1.15: 948f06374d0c502437b56e25f6b3ec237fe7c720
> Metadata keys should not conflict with physical columns
> -------------------------------------------------------
>
> Key: FLINK-26712
> URL: https://issues.apache.org/jira/browse/FLINK-26712
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Timo Walther
> Assignee: Timo Walther
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.15.0
>
>
> If you have an field called timestamp and in addition want to read the timestamp from the metadata:
> {code}
> CREATE TABLE animal_sightings_with_metadata (
> `timestamp` TIMESTAMP(3),
> `name` STRING,
> `country` STRING,
> `number` INT,
> `append_time` TIMESTAMP(3) METADATA FROM 'timestamp',
> `partition` BIGINT METADATA VIRTUAL,
> `offset` BIGINT METADATA VIRTUAL,
> `headers` MAP<STRING, BYTES> METADATA,
> `timestamp-type` STRING METADATA,
> `leader-epoch` INT METADATA,
> `topic` STRING METADATA
> )
> {code}
> This gives:
> {code}
> [ERROR] Could not execute SQL statement. Reason:
> org.apache.flink.table.api.ValidationException: Field names must be unique. Found duplicates: [timestamp]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)