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

Unable to tokenize hex string with Rust tokenizer using Snowflake dialect #4560

Open
whummer opened this issue Jan 3, 2025 · 0 comments
Open

Comments

@whummer
Copy link
Contributor

whummer commented Jan 3, 2025

Follow-up from #4559, filing the reproducible issue here.

Fully reproducible code snippet

Note: this issue seems to be related to the Rust tokenizer.

The following piece of code (tested against Snowflake) ...:

from sqlglot import parse_one

query = "INSERT INTO test VALUES (X'48FAF43B0AFCEF9B63EE3A93EE2AC2')"
parse_one(query, dialect="snowflake")

... fails with:

E           sqlglot.errors.TokenError: Error tokenizing 'NTO test VALUES (X'48FAF43B0AFCEF9B63EE3A93EE2AC2'': Numeric string contains invalid characters from 1:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant