[
https://issues.apache.org/jira/browse/FLINK-16110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17038892#comment-17038892
]
Timo Walther commented on FLINK-16110:
--------------------------------------
The current problem is that {{TableSchema}} is used for two purposes:
Describing the schema of a view ({{Table}} object) and representing the schema
part of DDL. For the schema of the view, people need to be able to print the
metadata to know which columns are time attributes. I would not perform any
change to TableSchema right now, but instead remind to think about what is
persisted and what is not. There is no reason to persist a time attribute of a
table schema.
Users cannot easily create TimestampType with ROWTIME kind if they are using
{{DataTypes}}.
> LogicalTypeParser can't parse "TIMESTAMP(3) *ROWTIME*" and "TIMESTAMP(3)
> *PROCTIME*"
> ------------------------------------------------------------------------------------
>
> Key: FLINK-16110
> URL: https://issues.apache.org/jira/browse/FLINK-16110
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.10.0
> Reporter: godfrey he
> Priority: Major
>
> {{TIMESTAMP(3) *ROWTIME*}} is the string representation of
> {{TimestampType(true, TimestampKind.ROWTIME, 3)}} , however
> {{LogicalTypeParser}} can't convert it to {{TimestampType(true,
> TimestampKind.ROWTIME, 3)}}.
> TIMESTAMP(3) *PROCTIME* is the same case.
> the exception looks like:
> {code}
> org.apache.flink.table.api.ValidationException: Could not parse type at
> position 12: Unexpected token: *ROWTIME*
> Input type string: TIMESTAMP(3) *ROWTIME*
> at
> org.apache.flink.table.types.logical.utils.LogicalTypeParser$TokenParser.parsingError(LogicalTypeParser.java:371)
> at
> org.apache.flink.table.types.logical.utils.LogicalTypeParser$TokenParser.parsingError(LogicalTypeParser.java:380)
> at
> org.apache.flink.table.types.logical.utils.LogicalTypeParser$TokenParser.parseTokens(LogicalTypeParser.java:357)
> at
> org.apache.flink.table.types.logical.utils.LogicalTypeParser$TokenParser.access$000(LogicalTypeParser.java:333)
> at
> org.apache.flink.table.types.logical.utils.LogicalTypeParser.parse(LogicalTypeParser.java:106)
> at
> org.apache.flink.table.types.logical.utils.LogicalTypeParser.parse(LogicalTypeParser.java:116)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)