Skip to content

duckdb: cover rowid with an analyze case - #4722

Merged
kyleconroy merged 3 commits into
mainfrom
claude/project-thread-vhhe51
Dec 1, 2026
Merged

kyleconroy merged 3 commits into
mainfrom
claude/project-thread-vhhe51

Conversation

@kyleconroy

Copy link
Copy Markdown
Collaborator

Requested by Kyle · project thread

Follow-up to #4697. It changes only the test, so the rowid fix is covered by analysis alone and not by generated code.

  • Moves schema.sql and query.sql unchanged from duckdb_rowid/duckdb to analyze_rowid/duckdb.
  • Replaces the sqlc.yaml and the generated go/ golden with an analyze exec.json and its stdout.json.

The new stdout.json records rowid as a nullable bigint for plan, keeps it out of SELECT *, INSERT and RETURNING *, and types ledger's declared rowid as varchar. TestReplay/base passes.

The branch also carries a merge of the commit from the closed #4721. That merge keeps this tree unchanged, so a squash merge brings in only the test move.


Generated by Claude Code

Every DuckDB base table offers a rowid that a query can select, filter on
and order by. The converter now adds it to each table as a hidden, nullable
BIGINT column, the way the SQLite engine adds the hidden columns of an fts5
table, so it resolves by name but stays out of star expansions, INSERT
targets and the table's model. A table that declares its own rowid keeps
that column.

Fixes #4676

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4JY6kCxkjBm6hN7Lf3
Replaces the generated-Go golden from #4697 with an analyze case over the
same schema and queries, so the test pins what sqlc infers for rowid rather
than the code it generates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4JY6kCxkjBm6hN7Lf3
@kyleconroy kyleconroy self-assigned this Dec 1, 2026
@kyleconroy
kyleconroy merged commit 5daa2db into main Dec 1, 2026
13 checks passed
@kyleconroy
kyleconroy deleted the claude/project-thread-vhhe51 branch December 1, 2026 04:18
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.

2 participants