Skip to content

fix: parse user variables with three or more name parts - #2949

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
harryfoster2006:fix/multi-part-user-variable
Nov 21, 2026
Merged

manticore-projects merged 1 commit into
JSQLParser:masterfrom
harryfoster2006:fix/multi-part-user-variable

Conversation

@harryfoster2006

Copy link
Copy Markdown
Contributor

Problem

The assignment probe in SimpleExpression looked only 5 tokens ahead, so something like: @db.sch.stg filled the window before the = or := check and was committed to as an assignment.

Fix

Scan the whole variable chain instead, so Snowflake stage references such as DIRECTORY(@db.sch.stg) parse.

The assignment probe in SimpleExpression looked only 5 tokens ahead, so
"@db.sch.stg" filled the window before the "=" or ":=" check and was
committed to as an assignment. Scan the whole variable chain instead, so
Snowflake stage references such as DIRECTORY(@db.sch.stg) parse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you much.

@manticore-projects
manticore-projects merged commit ea2d1d1 into JSQLParser:master Nov 21, 2026
10 checks passed
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.

2 participants