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 2021/09/28 13:31:00 UTC
[jira] [Updated] (FLINK-24399) Make handling of DataType less
verbose
[ https://issues.apache.org/jira/browse/FLINK-24399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther updated FLINK-24399:
---------------------------------
Description:
{{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:
- Add a {{DynamicTableFactory.Context#getPhysicalRowDataType(): DataType}}
- Add a {{DynamicTableFactory.Context#getPrimaryKey: Optional<UniqueConstraint>}}
- Add a {{DataType#getFieldNames: List<String>}} (empty for atomics)
- Add a {{DataType#getFieldDataTypes: List<DataType>}} as a synonym for {{getChildren}} (empty for atomics)
- Add a {{DataType#getFieldCount: int}} (0 for atomics)
- Add a {{DataType#getProjectedFields(int[][]): DataType}} (like {{DataTypeUtils#projectRow}})
- Add a {{DataType#getProjectedFields(int[]): DataType}} (like {{DataTypeUtils#projectRow}})
This should simplify implementations and avoid needs for internal utilities.
was:
{{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:
- Add a {{DynamicTableFactory.Context#getPhysicalRowDataType(): DataType}}
- Add a {{DynamicTableFactory.Context#getPrimaryKey: Optional<UniqueConstraint>}}
- Add a {{DataType#getFieldNames: List<String>}} (empty for atomics)
- Add a {{DataType#getFieldDataTypes: List<DataType>}} as a synonym for {{getChildren}} (empty for atomics)
- Add a {{DataType#getFieldCount: int}} (0 for atomics)
This should simplify implementations and avoid needs for internal utilities.
> 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
> 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:
> - Add a {{DynamicTableFactory.Context#getPhysicalRowDataType(): DataType}}
> - Add a {{DynamicTableFactory.Context#getPrimaryKey: Optional<UniqueConstraint>}}
> - Add a {{DataType#getFieldNames: List<String>}} (empty for atomics)
> - Add a {{DataType#getFieldDataTypes: List<DataType>}} as a synonym for {{getChildren}} (empty for atomics)
> - Add a {{DataType#getFieldCount: int}} (0 for atomics)
> - Add a {{DataType#getProjectedFields(int[][]): DataType}} (like {{DataTypeUtils#projectRow}})
> - Add a {{DataType#getProjectedFields(int[]): DataType}} (like {{DataTypeUtils#projectRow}})
> This should simplify implementations and avoid needs for internal utilities.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)