[
https://issues.apache.org/jira/browse/FLINK-24399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17421424#comment-17421424
]
Timo Walther edited comment on FLINK-24399 at 9/28/21, 2:22 PM:
----------------------------------------------------------------
I added two more entries at the bottom of the list. This should make
{{DataTypeUtils}} obsolete, at least for the user. We will still use the
internal methods for very specific use cases.
was (Author: twalthr):
I added two more entries at the bottom of the list. This should make
{{DataTypeUtils}} obsolete. At least for the user, we will still use the
internal methods for very specific use cases.
> Make handling of DataType less verbose
> --------------------------------------
>
> Key: FLINK-24399
> URL: https://issues.apache.org/jira/browse/FLINK-24399
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Reporter: Timo Walther
> Assignee: Francesco Guardiani
> Priority: Major
>
> {{DataType}} is the API abstraction for declaring types and always includes
> the {{LogicalType}} as well. In order to ease the handling of this class, we
> should do the following additions:
> - {{DynamicTableFactory.Context#getPhysicalRowDataType(): DataType}}
> - {{DynamicTableFactory.Context#getPrimaryKeyFields(): int[]}}
> - {{DataType#getFieldNames: List<String>}} (empty for atomics)
> - {{DataType#getFieldTypes: List<DataType>}} as a synonym for {{getChildren}}
> (empty for atomics)
> - {{DataType#getFieldCount: int}} (0 for atomics)
> - {{DataType#projectFields(int[][]): DataType}} (like
> {{DataTypeUtils#projectRow}})
> - {{DataType#projectFields(int[]): DataType}} (like
> {{DataTypeUtils#projectRow}})
> - {{DataType#toInternal()}}
> - {{DataTypes#of(LogicalType)}}
> This should simplify implementations and avoid needs for internal utilities.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)