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

ToDate function cast invalid date to '1970-01-01' but spark return null #335

Open
loneylee opened this issue Mar 7, 2023 · 0 comments
Open

Comments

@loneylee
Copy link

loneylee commented Mar 7, 2023

Describe what's wrong

SELECT toDate('2023-99-14');  -- return 1970-01-01
SELECT toDate('2023-99-14 66:55:44');  -- return 1970-01-01

SELECT toDateOrNull('2023-99-14 66:55:44'); -- return 1970-01-01

Expected behavior
return null

In Clickhouse repo, the same issue:
ClickHouse#47120

Other functions like
unix_timestamp, to_unix_timestamp
has the same result

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

No branches or pull requests

1 participant