Repository navigation
fix(ndd): encode registered seed columns from plain Python values - #378
Merged
lipikaramaswamy merged 1 commit intoNov 6, 2026
Merged
Conversation
prepare_json_storage_seed normalized only Arrow-backed columns. When row groups infer different nested types, DataDesigner reads a registered side-effect column back as object arrays, and its JSON encoder rejects the numpy arrays inside (and NaN or numpy scalars). Normalize every registered column with to_python, moved from rewrite/parsers.py to schemas/shared.py so ndd does not import rewrite. Add a two-row-group handoff test and a NaN/numpy seed test; both fail without the fix. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Contributor
[Medium impact] This PR appears safe to merge; no actionable issues were found. SummaryThis PR converts every planned seed column to plain Python values before DataDesigner writes it.
No actionable issues found. Tests were inspected but not run; DataDesigner was unavailable in the review environment. Reviews (1) · Last reviewed commit: "fix(ndd): encode registered seed columns..." · Reviewed by Greptile |
9 of 16 tasks
lipikaramaswamy
pushed a commit
that referenced
this pull request
Nov 6, 2026
prepare_json_storage_seed normalized only Arrow-backed columns. When row groups infer different nested types, DataDesigner reads a registered side-effect column back as object arrays, and its JSON encoder rejects the numpy arrays inside (and NaN or numpy scalars). Normalize every registered column with to_python, moved from rewrite/parsers.py to schemas/shared.py so ndd does not import rewrite. Add a two-row-group handoff test and a NaN/numpy seed test; both fail without the fix. 🤖 Generated with Claude Code Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com> Co-authored-by: Claude <noreply@anthropic.com>
lipikaramaswamy
added a commit
that referenced
this pull request
Nov 6, 2026
* fix(ndd): preserve nested JSON storage across workflow handoffs Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com> * fix(ndd): encode registered seed columns from plain Python values (#378) prepare_json_storage_seed normalized only Arrow-backed columns. When row groups infer different nested types, DataDesigner reads a registered side-effect column back as object arrays, and its JSON encoder rejects the numpy arrays inside (and NaN or numpy scalars). Normalize every registered column with to_python, moved from rewrite/parsers.py to schemas/shared.py so ndd does not import rewrite. Add a two-row-group handoff test and a NaN/numpy seed test; both fail without the fix. 🤖 Generated with Claude Code Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com> Co-authored-by: Claude <noreply@anthropic.com> * fix(ndd): wrap seed errors and verify multi-batch handoffs Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com> --------- Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com> Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com> Co-authored-by: Aaron Gonzales <aagonzales@nvidia.com> Co-authored-by: Claude <noreply@anthropic.com>
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.
Fixes the multi-batch failure Andre raised on #375 (
storage.py:84). With more than one row group, a registered side-effect column (_validated_seed_entities,_validation_candidates,_entities_for_replace) can come back from DataDesigner asobjectarrays, and the next seed write raisesInvalidFileFormatError. On main + #375, Substitute and Rewrite both fail this way withbuffer_size=2, two entity-free rows, then two with entities.What changes
prepare_json_storage_seedrebuilds every planned column from plain Python values, not only Arrow-backed ones. Numpy arrays and scalars become lists and Python scalars, and a top-level NaN,pd.NAor None becomes None._to_pythonfromrewrite/parsers.py, moved toengine/schemas/shared.pyasto_pythonsoengine.ndddoes not importengine.rewrite.normalize_payloadbehaves the same.pyarrowis no longer imported instorage.py.Checks
Two new tests in
tests/engine/test_ndd_storage.py:All three cases fail on
caab2130withInvalidFileFormatError.The full suite, ruff and
make typecheckpass.On main + fix(ndd): preserve nested JSON storage across workflow handoffs #375, the end-to-end Substitute and Rewrite run above passes with this commit and fails without it.
When #375 is rebased onto main, this commit conflicts with #367 in
schemas/shared.py. Keep #367's tail and addto_pythonafter it; the result passes the full suite.🤖 Generated with Claude Code