Skip to content

fix: avoid false schema warnings for quoted dots - #221

Merged
Light2Dark merged 1 commit into
mainfrom
codex/quoted-table-diagnostics
Oct 15, 2026
Merged

Light2Dark merged 1 commit into
mainfrom
codex/quoted-table-diagnostics

Conversation

@Light2Dark

@Light2Dark Light2Dark commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

This pull request was authored by a coding agent.

📝 Summary

  • Valid queries such as SELECT u.id FROM "my.table" u and SELECT u.id FROM "my.db".users u receive false schema warnings because the semantic linter splits dots inside quoted identifiers.
  • Preserve the parser's identifier segments through table and column lookup so "my.table" resolves independently from my.table. The change is internal to the semantic linter.
  • Cover quoted catalog/table names and a schema containing both a quoted table and a genuinely nested table with different columns.

📋 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 14, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 93.38% 1709 / 1830
🔵 Statements 93.48% 1766 / 1889
🔵 Functions 94.71% 233 / 246
🔵 Branches 87.18% 1374 / 1576
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/sql/semantic-diagnostics.ts 93.75% 85.71% 100% 93.6% 162, 228, 287, 380, 397-404, 426, 450, 590-592, 626, 660
Generated in workflow #939 for commit 5adb47e by the Vitest Coverage Report Action

@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

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/sql/semantic-diagnostics.ts
@Light2Dark
Light2Dark marked this pull request as ready for review October 15, 2026 03:25
@Light2Dark
Light2Dark merged commit 5adb47e into main Oct 15, 2026
6 checks passed
@Light2Dark
Light2Dark deleted the codex/quoted-table-diagnostics branch October 15, 2026 03:26
Light2Dark added a commit that referenced this pull request Oct 15, 2026
**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](#221 (comment)).

## 📋 Pre-Review Checklist

- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/codemirror-sql/discussions)
(Please provide a link if applicable).
- [x] 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

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/codemirror-sql/blob/main/CONTRIBUTING.md).
- [x] Documentation has been updated where applicable, including
docstrings for API changes.
- [x] Tests have been added for the changes made.

> Written by gpt-6 on Codex
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