Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-36474] Support merging timestamp columns when routing #3636

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuxiqian
Copy link
Contributor

@yuxiqian yuxiqian commented Oct 11, 2024

This closes FLINK-36474.

For now, it's not possible to merge timestamp-family data (including Timestamp, ZonedTimestamp, and LocalZonedTimestamp) without some awkward transform rules and explicit castings. This PR adds the following type coercions:

  • TIMEs, TIMESTAMPs, TIMESTAMP_TZs, and TIMESTAMP_LTZs with promoted precision

For example, TIMESTAMP(3) and TIMESTAMP(6) will be considered compatible and data with lower precision will be automatically escalated to the higher one.

  • TIMESTAMP_TZs and TIMESTAMP_LTZs will be converted to TIMESTAMP if necessary.

I reused some code from SystemFunctionUtils#castToTimestamp, so this implicit behavior should be equivalent to writing explicit castings manually.

@yuxiqian
Copy link
Contributor Author

Could @lvyanquan @aiwenmo please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant