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

[Backport 1.17] fix: Return null if a date is invalid #900

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Conversation

saig0
Copy link
Member

@saig0 saig0 commented Aug 23, 2024

Description

Backport of #889 for 1.17.

All changes are the same as in the original.

Related issues

closes #867

saig0 added 4 commits August 23, 2024 09:40
Add a test case to verify that the date() function returns null if the given date is not valid.

(cherry picked from commit 2943e92)
Add a test case to verify that a date literal is null if the given date is not valid.

(cherry picked from commit f254d79)
Restrict the date/date-time pattern to avoid the creation of invalid dates (e.g. leap year, month with 31 days, etc.).

(cherry picked from commit 85806fe)
(cherry picked from commit f828ba5)
@saig0 saig0 requested a review from korthout August 23, 2024 07:53
Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@saig0 saig0 merged commit ee3d31c into 1.17 Aug 26, 2024
4 checks passed
@saig0 saig0 deleted the 867-backport-1.17 branch August 26, 2024 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants