Skip to content

Fix SQL cell deps lost when duckdb fails to parse normalized SQL#8437

Merged
mscolnick merged 3 commits intomainfrom
push-nynnppquwyoz
Feb 26, 2026
Merged

Fix SQL cell deps lost when duckdb fails to parse normalized SQL#8437
mscolnick merged 3 commits intomainfrom
push-nynnppquwyoz

Conversation

@manzt
Copy link
Collaborator

@manzt manzt commented Feb 23, 2026

Fixes #8436

SQL cells use duckdb to split multi-statement queries before extracting
refs with sqlglot. When duckdb couldn't parse the SQL, we bailed out
entirely and could lose dependency information. Now when duckdb parsing
fails, we fall through to sqlglot on the full SQL string instead of
returning early, which can still salvage table refs.

Fixes #8436

SQL cells use duckdb to split multi-statement queries before extracting
refs with sqlglot. When duckdb couldn't parse the SQL, we bailed out
entirely and could lose dependency information. Now when duckdb parsing
fails, we fall through to sqlglot on the full SQL string instead of
returning early, which can still salvage table refs.
@manzt manzt requested a review from dmadisetti as a code owner February 23, 2026 19:35
@manzt manzt added the bug Something isn't working label Feb 23, 2026
@vercel
Copy link

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Error Error Feb 25, 2026 9:41pm

Request Review

mscolnick
mscolnick previously approved these changes Feb 23, 2026
Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix. this is definitely more correct

@manzt
Copy link
Collaborator Author

manzt commented Feb 23, 2026

thanks for the fix. this is definitely more correct

Some failing tests... looking into it

@mscolnick mscolnick merged commit 7d658fe into main Feb 26, 2026
40 of 43 checks passed
@mscolnick mscolnick deleted the push-nynnppquwyoz branch February 26, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL cell dependencies prevent auto-update upon widget state change

2 participants