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
{{ message }}
Repository navigation
Commit a624f15
Browse filesBrowse the repository at this point in the historyBrowse files
preprocess: do not rewrite sqlc syntax for GoogleSQL or ClickHouse
Both engines are getting their own parameter system, so they should not
pick up sqlc.arg()/narg()/slice()/embed() by default just because the
preprocessor happens to be dialect-driven.
Drop their entries from the dialect table. An engine with no entry is now
passed through untouched: File returns the source unchanged with an empty
side table, so sqlc.arg() reaches the parser as the function call it looks
like and fails there. Leaving an engine out of the table is the switch,
and dialect.go says so.
GoogleSQL still converts "@name" to a ParamRef. That is native GoogleSQL
syntax rather than sqlc syntax, and the AST rewriter that used to turn it
into one is gone, so the converter has to. Parameter names now come from
the column the parameter is compared against, which is what every
GoogleSQL golden already expected.
The ClickHouse operator work stays, retargeted off sqlc syntax:
A_Expr_Kind_OP on binary and unary operators plus the seeded comparison
and arithmetic operators are what let the analysis core type a WHERE
clause at all, and analyze_params/clickhouse now covers them with native
"?" placeholders.
Preprocessor testdata drops to 69 cases across the three engines that are
actually preprocessed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015BSM9xGoosq58r1Mz6B7YP
0 commit comments