Skip to content

fix(athena): route by each engine's rules when the combined tokenizer fails [CLAUDE] - #8629

Open
masiljangajji wants to merge 1 commit into
tobymao:mainfrom
masiljangajji:fix/athena-trino-backslash-literal
Open

masiljangajji wants to merge 1 commit into
tobymao:mainfrom
masiljangajji:fix/athena-trino-backslash-literal

Conversation

@masiljangajji

Copy link
Copy Markdown

Fixes #8628

The routing step tokenizes with the combined Hive and Trino rules and raises when that fails, so literals valid in only one engine, like '\' in Trino or "a\"b" in Hive, never get routed. Now, when it fails, each engine's tokenizer is tried and used only if its tokens route to that engine. Statements the combined tokenizer handles take the same path as before.

Written with help from Claude.

… fails [CLAUDE]

Routing tokenizes with the union of Hive and Trino rules, which rejects literals
that are valid in a single engine: '\' or ESCAPE '\' in Trino and "a\"b" in Hive.
A failure there only means the union can't route the statement, so each engine's
own tokenizer is tried and used if its tokens route to that engine. Statements
the union tokenizes are unaffected.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Athena: valid Trino string literals ending in a backslash fail to tokenize

1 participant