Skip to content

fix: distinguish quoted table names in column diagnostics - #222

Merged
Light2Dark merged 2 commits into
mainfrom
codex/quoted-column-qualifiers
Oct 15, 2026
Merged

Light2Dark merged 2 commits into
mainfrom
codex/quoted-column-qualifiers

Conversation

@Light2Dark

@Light2Dark Light2Dark commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

This pull request was authored by a coding agent.

📝 Summary

  • A column reference such as "my.table".id can resolve against my.table when both tables occur in a query, producing a false unknown-column warning or missing an invalid column.
  • Keep database, schema, and table qualifier segments separate through source matching. Single-identifier aliases retain precedence, including aliases that contain dots.
  • Cover both directions of the quoted-name collision with valid and invalid columns, and require parser success so unsupported syntax cannot silently pass the cases. This follows up the existing limitation identified in #221.

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (optional).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Written by gpt-6 on Codex

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 93.67% 1717 / 1833
🔵 Statements 93.76% 1774 / 1892
🔵 Functions 94.77% 236 / 249
🔵 Branches 87.58% 1383 / 1579
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/sql/semantic-diagnostics.ts 95.75% 88.38% 100% 95.65% 162, 228, 287, 380, 404, 425, 449, 594-596, 630, 664
Generated in workflow #942 for commit 8f054ea by the Vitest Coverage Report Action

@Light2Dark
Light2Dark marked this pull request as ready for review October 15, 2026 03:32

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

Re-trigger cubic

Comment thread src/sql/semantic-diagnostics.ts
Comment thread src/sql/__tests__/semantic-diagnostics.test.ts
@Light2Dark
Light2Dark merged commit 8f054ea into main Oct 15, 2026
5 checks passed
@Light2Dark
Light2Dark deleted the codex/quoted-column-qualifiers branch October 15, 2026 03:59
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