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

[SPARK-40014][SQL] Support cast of decimals to ANSI intervals #6328

Open
amahussein opened this issue Aug 15, 2022 · 0 comments
Open

[SPARK-40014][SQL] Support cast of decimals to ANSI intervals #6328

amahussein opened this issue Aug 15, 2022 · 0 comments
Labels
audit_3.4.0 Audit related tasks for 3.4.0 feature request New feature or request

Comments

@amahussein
Copy link
Collaborator

Context

What changes were proposed in SPARK pull request?

support casts of decimals to ANSI intervals, and follow the SQL standard

Before:

spark-sql> SELECT CAST(1.001002BD AS INTERVAL SECOND);
Error in query: cannot resolve 'CAST(1.001002BD AS INTERVAL SECOND)' due to data type mismatch: cannot cast decimal(7,6) to interval second; line 1 pos 7;

After:

spark-sql> SELECT CAST(1.001002BD AS INTERVAL SECOND);
0 00:00:01.001002000

Why changes were needed?

To improve user experience with Spark SQL, and to conform to the SQL standard.

Does this PR introduce any user-facing change?

Yes, improve error message

Why it might affect RAPIDS?

extend the expected behavior of Ansi Casts

Impact on Testing?

Yes

Requires Doc update?

No

@amahussein amahussein added feature request New feature or request ? - Needs Triage Need team to review and classify audit_3.4.0 Audit related tasks for 3.4.0 labels Aug 15, 2022
@sameerz sameerz removed the ? - Needs Triage Need team to review and classify label Aug 16, 2022
@nartal1 nartal1 mentioned this issue Sep 7, 2023
49 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit_3.4.0 Audit related tasks for 3.4.0 feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants