Skip to content

fix(core): harden extract_table_name parsing#28

Merged
lostmygithubaccount merged 1 commit into
mainfrom
fix/extract-table-name-robustness
Apr 6, 2026
Merged

fix(core): harden extract_table_name parsing#28
lostmygithubaccount merged 1 commit into
mainfrom
fix/extract-table-name-robustness

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Member

Summary

  • Handle schema-qualified names (schema.table → extracts table)
  • Handle quoted identifiers ("My Table" → extracts My Table)
  • Return None for subqueries (FROM (SELECT ...))
  • Added 9 unit tests covering all edge cases

Generated with Claude Code

…d subquery patterns

The function was fragile with schema-qualified names (extracted schema
instead of table), quoted identifiers (failed entirely), and subqueries
(returned garbage). Now handles all three cases and returns None for
subqueries. Added 9 unit tests covering the edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount enabled auto-merge (squash) April 6, 2026 02:54
@lostmygithubaccount lostmygithubaccount merged commit a5a2d53 into main Apr 6, 2026
1 check passed
@lostmygithubaccount lostmygithubaccount deleted the fix/extract-table-name-robustness branch April 6, 2026 03:04
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