[
https://issues.apache.org/jira/browse/FLINK-34147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17810300#comment-17810300
]
Yunhong Zheng commented on FLINK-34147:
---------------------------------------
Hi, [~lirui] . I also think it ambiguous. IMO, `TimestampData` may be possible
to split into two classes, such as `TimestampLtz` and `TimestampNtz`. In
`TimestampLtz`, it may contain methods `fromInstant()/toInstant()`, for
`TimestampNtz`, it may contain methods `fromLocalDateTime()/toLocalDateTime()`.
So, the logical type `LocalZonedTimestampType` need to represent by
`TimestampLtz`, and the logical type `TimestampType` is represented by
`TimestampNtz`.
I'm not sure how significant the impact of such a change would be on the flink
dataType system and whether it would be compatible. [~jark] WDYT?
> TimestampData to/from LocalDateTime is ambiguous
> ------------------------------------------------
>
> Key: FLINK-34147
> URL: https://issues.apache.org/jira/browse/FLINK-34147
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Rui Li
> Priority: Major
>
> It seems TimestampData is essentially an {{Instant}}. Therefore an implicit
> time zone is used in the {{fromLocalDateTime}} and {{toLocalDateTime}}
> methods. However neither the method name nor the API doc indicates which time
> zone is used. So from caller's perspective, the results of these two methods
> are ambiguous.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)