Skip to content

Incorrect parsing literals that consisting of digits and letters, beginning with digits #804

Closed
@DiamondMofeng

Description

@DiamondMofeng

It seems when parsing a literal beginning with digits, the sql parser simply ends this token when meets a non-numeric character

see https://github.com/sqlparser-rs/sqlparser-rs/blob/main/src/tokenizer.rs#L547

For example, 123foobar would be parsed into a number token 123 and a word token foobar instead of one word token 123foobar.

And 123foobar456 would be parsed into 123 and foobar456

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions