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

Extract from timestamp doesn't support nanosecond #4528

Closed
Tracked by #3148
comphead opened this issue Dec 6, 2022 · 7 comments · Fixed by #4789
Closed
Tracked by #3148

Extract from timestamp doesn't support nanosecond #4528

comphead opened this issue Dec 6, 2022 · 7 comments · Fixed by #4789
Assignees
Labels
bug Something isn't working

Comments

@comphead
Copy link
Contributor

comphead commented Dec 6, 2022

Describe the bug
Faced this when worked with #4385
date_part parses nanoseconds correctly

    test_expression!(
        "date_part('nanosecond', to_timestamp('2020-09-08T12:00:12.12345678+00:00'))",
        "12123456780"
    );

To Reproduce

     test_expression!(
         "EXTRACT(nanosecond FROM to_timestamp('2020-09-08T12:00:12.12345678+00:00'))",
         "1212345678"
     );

Invalid statement: sql parser error: Expected date/time field, found: nanosecond

Expected behavior
Should work

Additional context
Add any other context about the problem here.

@comphead comphead added the bug Something isn't working label Dec 6, 2022
@comphead
Copy link
Contributor Author

comphead commented Dec 6, 2022

Waiting for sqlparser-rs/sqlparser-rs#748

@comphead
Copy link
Contributor Author

comphead commented Dec 6, 2022

@waitingkuo please assign this ticket to me

@comphead
Copy link
Contributor Author

comphead commented Dec 9, 2022

Depends on #4573

@comphead
Copy link
Contributor Author

@waitingkuo reg to your PR sqlparser-rs/sqlparser-rs#748 what sqlparser version it will go to? I just checked recently released 0.28, but there is no change yet

@waitingkuo
Copy link
Contributor

@comphead 0.28 released right before this pr merged. we need 0.29 here

@comphead
Copy link
Contributor Author

Depends on #4770

@alamb
Copy link
Contributor

alamb commented Jan 2, 2023

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants