Skip to content

[FLINK-39682] Fix unable to invoke TO_DATE with TIMESTAMP types#4397

Merged
yuxiqian merged 2 commits into
apache:masterfrom
yuxiqian:FLINK-39682
May 18, 2026
Merged

[FLINK-39682] Fix unable to invoke TO_DATE with TIMESTAMP types#4397
yuxiqian merged 2 commits into
apache:masterfrom
yuxiqian:FLINK-39682

Conversation

@yuxiqian
Copy link
Copy Markdown
Member

This closes FLINK-39682.

The behavior of TO_DATE built-in function is silently changed after FLINK-38888. Previously, TO_DATE(timestamp) is equivalent to TO_DATE(CAST(timestamp AS VARCHAR)) or TO_DATE('2026-01-01 21:48:25'), results in 2026-01-01.

However, after rewriting TO_DATE strictly checks if input matches yyyy-MM-dd format, and returns null then.

Copy link
Copy Markdown
Contributor

@lvyanquan lvyanquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1.
Leave a comment.

@github-actions github-actions Bot added the docs Improvements or additions to documentation label May 18, 2026
@yuxiqian yuxiqian merged commit 9e075ca into apache:master May 18, 2026
53 of 57 checks passed
@yuxiqian yuxiqian deleted the FLINK-39682 branch May 18, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved composer docs Improvements or additions to documentation reviewed runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants