Skip to content

Preserve iterator-backed hash ID columns - #992

Open
0xeriiic wants to merge 1 commit into
simonw:mainfrom
0xeriiic:fix-hash-id-columns-iterator
Open

0xeriiic wants to merge 1 commit into
simonw:mainfrom
0xeriiic:fix-hash-id-columns-iterator

Conversation

@0xeriiic

@0xeriiic 0xeriiic commented Dec 4, 2026

Copy link
Copy Markdown

Fixes #991

Snapshot one-shot hash_id_columns inputs before using them to hash rows or saving them as defaults. The selected columns are then available for every row and for later inserts using the same table defaults.

The regression tests cover an iterator passed directly to insert_all(), an iterator passed to db.table(), and an iterator passed to table.create(). All 12 targeted hash ID tests passed in both SQLite connection modes on Python 3.13 and Windows.

OpenAI Codex assisted with reproducing the bug, writing the change and regression tests, and preparing this draft.

AI assistance: OpenAI 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.

One-shot iterators passed as hash_id_columns produce incorrect IDs after the first row

1 participant