Repository navigation
fix(schema): refuse sets of struct-stored user classes #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6d26384
fix(schema): refuse sets of struct-stored user classes
eywalker cbe2329
docs(database): generate the user-class set restriction
eywalker 4be401a
docs(schema): track deferred user-class set ordering
eywalker 8d3be77
Merge remote-tracking branch 'origin/main' into eywalker/itl-922-refu…
eywalker 2122329
fix(schema): limit user-class set checks to declarations
eywalker cc7fea0
fix(schema): close user-class set declaration gaps
eywalker 85f147e
chore: merge main into user class set branch
eywalker f4b5bcd
fix(semantic-types): refuse struct-stored user class sets at conversion
eywalker 125f721
fix(semantic-types): name the column in set write errors
eywalker 650f9c9
test(semantic-types): type the custom source fixture
eywalker 667d66b
Merge remote-tracking branch 'origin/main' into eywalker/itl-922-refu…
eywalker bb40cb1
fix(conversion): complete the user-class set refusal
eywalker 5077879
fix(conversion): keep the user-class set check read-only
eywalker f8baad2
Merge remote-tracking branch 'origin/main' into eywalker/itl-922-refu…
eywalker 56b2486
fix(conversion): simplify user-class set refusal diagnostics
eywalker 56ca4a8
fix(conversion): refuse sets of deferred struct types
eywalker 1fec597
fix(conversion): honor registered whole-set encoders
eywalker 97ba08c
docs(database): sync native set wording with matrix generator
eywalker d0ebcdd
fix(conversion): preserve precomputed write schema and refusal context
eywalker debef3b
Merge remote-tracking branch 'origin/main' into eywalker/itl-922-refu…
eywalker 658c635
fix(conversion): preserve eager converter selection for native sets
eywalker ecb550d
fix(conversion): preserve native set validation before writes
eywalker 00a75c4
test(conversion): match native annotation wording on Python 3.13
eywalker 5c5f889
fix(conversion): validate before refusing native class set writes
eywalker 1382e19
chore: merge main into ITL-922
eywalker 756366c
chore: merge main into PR 666
eywalker 9055604
test(semantic-types): isolate the cold IPC set fixture
eywalker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ### Breaking changes and migration | ||
|
|
||
| - Converting Python sets of struct-stored user classes to Orcapod's native set storage now | ||
| raises an error, including for nested sets. Use `list[T]` and supply the elements in the | ||
| order you want stored. Registered logical types for whole sets keep their own storage. | ||
| Annotations and reads of existing Arrow data continue to work. ITL-1691 tracks canonical | ||
| ordering for these sets. |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ## `src/orcapod/logical_types/list_logical_type_factory.py` — set storage order | ||
|
|
||
| ### SU1 — A set of struct-stored user classes needs a canonical order | ||
| **Status:** resolved | ||
| **Severity:** high | ||
| **Issue:** ITL-922 | ||
|
|
||
| The stored order of a set of struct-stored user classes can follow the set's iteration | ||
| order, so equal sets can have different stored representations and row hashes. | ||
|
|
||
| **Fix:** The native set converter checks the resolved Arrow destination after the | ||
| original encoder validates the elements. The converter caches the refusal decision for | ||
| resolved plans. A registered whole-set encoder owns its storage. Empty declarations | ||
| and Arrow reads keep their original behavior. For a cold or wrapped annotation that | ||
| fails eager resolution, a matching native Arrow destination and actual instances identify | ||
| the write to refuse. The refusal directs writers to `list[T]`. ITL-1691 tracks the | ||
| canonical storage order. | ||
|
|
||
| With a cold converter and a matching explicit native Arrow schema, a required | ||
| `set[PlainPoint]` containing `PlainPoint(1)` and `None` raises | ||
| `UserClassSetNotStorableError` in place of the eager schema-resolution `ValueError` | ||
| (ITL-1754). |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.