Skip to content

fix(deparser): emit alias-qualifier unquoted, always quote identifiers#29

Merged
stbischof merged 2 commits into
eclipse-daanse:mainfrom
stbischof:main
May 5, 2026
Merged

fix(deparser): emit alias-qualifier unquoted, always quote identifiers#29
stbischof merged 2 commits into
eclipse-daanse:mainfrom
stbischof:main

Conversation

@stbischof

@stbischof stbischof commented May 4, 2026

Copy link
Copy Markdown
Contributor

Qualified column references (f.col) used to go through the dialect's
quoteIdentifier(qual, name), which wrapped both parts under the
dialect's quoting policy. The FROM clause emitted aliases unquoted (AS f), so "f"."col" no longer matched the case-folded alias F and H2
rejected the SQL.

The qualifier is now appended verbatim and only the column name is
wrapped in the dialect's quote character. FROM-clause
catalog/schema/table names are also always quoted. The SqlGuard already
resolves identifiers against the database catalog before deparsing, so
the AST carries canonical-case names that match the engine's
case-sensitive lookup.

Qualified column references (`f.col`) used to go through the dialect's
`quoteIdentifier(qual, name)`, which wrapped both parts under the
dialect's quoting policy. The FROM clause emitted aliases unquoted (`AS
f`), so  `"f"."col"` no longer matched the case-folded alias `F` and H2
rejected the SQL.

The qualifier is now appended verbatim and only the column name is
wrapped in the dialect's quote character. FROM-clause
catalog/schema/table names are also always quoted. The SqlGuard already
resolves identifiers against the database catalog before deparsing, so
the AST carries canonical-case names that match the engine's
case-sensitive lookup.

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
@stbischof stbischof changed the title add configurable identifier quoting policy to dialect deparsers fix(deparser): emit alias-qualifier unquoted, always quote identifiers May 4, 2026
table names

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
@stbischof
stbischof merged commit 2734e0c into eclipse-daanse:main May 5, 2026
5 of 7 checks passed
@stbischof stbischof mentioned this pull request May 5, 2026
1 task
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.

1 participant