Skip to content

fix(client): preserve underscores in SQL column aliases#3193

Closed
LarryHu0217 wants to merge 1 commit into
perspective-dev:masterfrom
LarryHu0217:codex/perspective-sql-underscore-alias-3187
Closed

fix(client): preserve underscores in SQL column aliases#3193
LarryHu0217 wants to merge 1 commit into
perspective-dev:masterfrom
LarryHu0217:codex/perspective-sql-underscore-alias-3187

Conversation

@LarryHu0217

@LarryHu0217 LarryHu0217 commented Jul 9, 2026

Copy link
Copy Markdown

Description

Preserves underscores in column aliases generated by GenericSQLVirtualServerModel. The SQL builder previously replaced _ with -, so selecting account_number produced an alias named account-number and changed the schema exposed to clients.

The fix keeps the original identifier while continuing to escape embedded double quotes. Regression tests cover both flat and aggregated view queries.

Fixes #3187.

Validation

  • cargo test --features generate-proto,omit_metadata generic_sql_model --no-default-features (25 passing)
  • rustfmt --check on the changed Rust files
  • git diff --check origin/master...HEAD

Tooling assistance

Codex assisted with implementation and local validation. I reviewed the resulting diff and test output.

Signed-off-by: Liang Hu <lh3057@columbia.edu>
@texodus

texodus commented Jul 10, 2026

Copy link
Copy Markdown
Member

I've update #3187 to clarify this is an explicit design decision, not a bug.

@texodus texodus closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

GenericSQLVirtualServerModel mangles column names with underscores

2 participants