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

Minor: make unsupported nanosecond part a real (not internal) error #13733

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Dec 11, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

I noticed this while working on #13732

Extracting nanoseconds from a timestamp is not supported, but currently that is marked as in internal error. Let's make it the proper code (not supported)

What changes are included in this PR?

Changes:

  1. Change error to be "unsupported" rather than internal

Are these changes tested?

Yes, this change is covered by tests (see updates)

Are there any user-facing changes?

Clearer error message

@@ -225,7 +225,7 @@ SELECT EXTRACT(microsecond FROM timestamp '2020-09-08T12:00:12.12345678+00:00')
----
12123456

query error DataFusion error: Internal error: unit Nanosecond not supported
query error DataFusion error: This feature is not implemented: unit Nanosecond not supported
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This demonstrates the behavior change -- it is not an internal error anymore

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions labels Dec 11, 2024
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

... unsupported nanosecond part

nanosecond part or nanosecond unit?

@alamb
Copy link
Contributor Author

alamb commented Dec 12, 2024

... unsupported nanosecond part

nanosecond part or nanosecond unit?

I double checked @findepi and indeed this is the nanosecond part, so I improved the message in 95d0dd5

Thank you @xudong963 for the review 🙏

@alamb alamb merged commit 98c483e into apache:main Dec 12, 2024
25 checks passed
@alamb alamb deleted the alamb/non_internal_err branch December 12, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants