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

Flink Jira Bot commented on FLINK-18596:
----------------------------------------

This major issue is unassigned and itself and all of its Sub-Tasks have not 
been updated for 30 days. So, it has been labeled "stale-major". If this ticket 
is indeed "major", please either assign yourself or give an update. Afterwards, 
please remove the label. In 7 days the issue will be deprioritized.

> Derive format schema from table schema may get error result
> -----------------------------------------------------------
>
>                 Key: FLINK-18596
>                 URL: https://issues.apache.org/jira/browse/FLINK-18596
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.11.0
>            Reporter: wangsan
>            Priority: Major
>              Labels: pull-request-available, stale-major
>
> If rowtime attribute references a regular field, derive format schema from 
> table schema may get error result:
> {code}
> Schema schema = new Schema()
>       .field("f1", DataTypes.STRING())
>       .field("f2", DataTypes.BIGINT()).from("t")
>       .field("r", DataTypes.TIMESTAMP(3))
>       .rowtime(
>               new 
> Rowtime().timestampsFromField("t").watermarksPeriodicBounded(3));
> final Map<String, String> properties = schema.toProperties();
> final TableSchema actualSchema = 
> TableFormatFactoryBase.deriveSchema(properties);
> {code}
> this code snippet will result in `ValidationException("Field names must be 
> unique. Duplicate field: '" + fullFieldName + "'")`, but the excepted result 
> should be:
> {code}
> final TableSchema expectedSchema = TableSchema.builder()
>       .field("f1", Types.STRING)
>       .field("t", Types.LONG)
>       .build();
> {code}



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

Reply via email to