You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix for side-effects seeping into data query (#419)
* Fix CREATE + VISUALISE FROM producing invalid double-wrapped SQL
transform_global_sql concatenated side-effect SQL (CREATE, INSERT, …) with
the VISUALISE FROM injection, then the caller wrapped the whole thing in
another CREATE TABLE AS, producing invalid SQL like:
CREATE TABLE __ggsql_global__ AS CREATE TEMP TABLE data …
Split the return into side-effect statements (executed directly) and the
queryable part (wrapped as the global temp table).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* add news bullet
* cargo fmt
* Fix grammar: INSERT/UPDATE/DELETE parsed as other_sql_statement
The tree-sitter lexer was misclassifying INSERT, UPDATE, and DELETE
keywords as bare_identifier tokens, causing them to fall through to
other_sql_statement instead of their specific statement rules. This
happened because keyword prefixes (e.g. IN for INSERT) derailed the
lexer's specific keyword path.
Fix: wrap the three leading keywords in token(prec(1, ...)) so they
get dedicated high-priority lexer tokens, and downgrade
other_sql_statement's catch-all regex from token() to a bare regex.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add cross-references between the two preamble execution paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Rename does_consume_cte to has_executable_sql
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Execute side-effect statements before trailing SELECT
transform_global_sql returned empty side-effects when a SELECT was
present, so CREATE/INSERT preambles were skipped. Hoist side-effect
extraction so it runs regardless of the query type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments