Repository navigation
Restore model defaults on inserts after the switch to COPY - #157
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzQgrukduKz6DPZrKfr3Rb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzQgrukduKz6DPZrKfr3Rb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzQgrukduKz6DPZrKfr3Rb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzQgrukduKz6DPZrKfr3Rb
…e default An all-null float64 column (a string or bool default) or a nullable Int64 column (parallax's 1e-7) refused the default: a FutureWarning on pandas 2, a TypeError on pandas 3, and a TypeError for Int64 on both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzQgrukduKz6DPZrKfr3Rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #156, inserts go through
COPY, which never sees the models' client-sidedefault=values. Columns missing from the input are stored as NULL, and inputs withouttarget.single_exptime(NOT NULL) fail outright.Changes
TargetDB.insert()adds the columns missing from the input, set to their model default. This restores the pre-COPYbehaviour for all callers.pd.NA/""with the default, except in columns whose default is"".Testing
uv run pytest tests: 108 passed, 1 skipped (the existing skip intest_clustering.py), including the Docker integration tests. The new integration test reads back whatCOPYstored. Againstmain, it fails on thesingle_exptimeNOT NULL violation.🤖 Generated with Claude Code