Skip to content

Extract from timestamp doesn't support nanosecond #4528

@comphead

Description

@comphead

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions