Repository navigation
Keep simple values when global transform is false - #86
Merged
martinv13 merged 2 commits intoOct 20, 2026
Merged
Conversation
With the global "transform": false option, simple columns lost their "join" transform, which the parser uses to read simple element values, so these values were loaded as NULL. The global option now only disables elevation and choice collapsing. Add an orders sample model version with global "transform": false so that round-trip tests cover it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend the orders sample model configs with a forced "elevate" on an optional child, a column type override, and choice_transform: True overriding the global transform: false. Add a test running document_tree_hook and document_tree_node_hook during parsing. Co-Authored-By: Claude Opus 5.5 <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.
Closes #81.
Fix
With the global
"transform": falseoption, simple element values were silently loaded as NULL. The parser uses the"join"field transform to know which fields hold simple values, and_get_field_transformturned it off along with elevation when the global option was false. Simple columns now always get"join", so the global option only disables elevation of child tables and collapsing of choice groups. Per-fieldtransform: falseis unchanged.The docs entry for the global option said it also disabled joining of multi-value columns. It now says joining stays on, which matches the existing note that opting out of
joinis not supported.Tests
orderssample model version (version3) with global"transform": false, picked up by the existing parametrized tests. Without the fix, it fails the XML round-trip and the document-tree-to-XML tests. It skipsextra: without elevation, the empty<extra>element inequivalent_xmlwould add a row.Unrelated to the bug, some other config options had no test coverage, so the second commit adds:
"elevate"onshipto(optional, many columns, so never elevated automatically) and a fieldtypeoverride (quantity: BigInteger) inversion2.choice_transform: TrueoncompanyIdinversion3, overriding the globaltransform: false.test_document_tree_hooks, running both hooks during parsing with each parsing strategy.Snapshots were regenerated:
version2changes and theversion3files are new. The full suite passes on DuckDB andmkdocs build --strictpasses.🤖 Generated with Claude Code