Repository navigation
Add ability to define composite dtypes, i.e. dtypes redefining meaning of another dtype - #103
Merged
Merged
Conversation
robert3005
enabled auto-merge (squash)
March 14, 2024 14:28
robert3005
commented
Mar 14, 2024
gatesn
reviewed
Mar 14, 2024
gatesn
left a comment
Contributor
There was a problem hiding this comment.
Not sure what you mean by a pointer?
| pub fn map(key_type: DType, value_type: DType) -> DType { | ||
| DType::Composite( | ||
| Arc::new(MAP_DTYPE.to_string()), | ||
| Box::new(DType::Struct( |
Contributor
There was a problem hiding this comment.
This isn't what an Arrow map represents I don't think
Contributor
Author
There was a problem hiding this comment.
This is how it's logically made. The physical representation is different.
Contributor
Author
|
I mean in some cases you will want to prefrom operation based on dtype. Maybe every composite dtype needs an encoding. |
gatesn
approved these changes
Mar 15, 2024
Contributor
Author
|
I have been thinking about the map case more and I think in our system we have to include the list explicitly? Overall it’s unclear how to use a composite type and minimally for any composite type there should be an associated encoding? |
robert3005
pushed a commit
that referenced
this pull request
Nov 11, 2026
## Summary Fixes #11364. Closing a Spark reader currently leaves its Java-owned native read handles and file caches alive until Cleaner processing. Make that release explicit and idempotent, while preserving the resources still needed by derived scans, returned partitions and Arrow batches. Ports the lifecycle fix from [QC #103](quantcast#103). ## Changes - Make `DataSource` and `Scan` implement `AutoCloseable`, retaining Cleaner fallback. Keep native calls synchronized with explicit close; fence scan options so their expressions remain alive across JNI. - Release partitions prefetched by `hasNext()` but never returned. - Let Spark's owning wrappers close at EOF. Reader and footer cleanup attempts every close in ownership order and preserves the original failure. - Release native partition ownership when Arrow stream allocation or import fails. - Reject reads on closed handles with `IllegalStateException`. An open, exhausted scan still returns `false` from `hasNext()` and throws `NoSuchElementException` from `next()`. --------- Signed-off-by: Christopher Wirt <[email protected]>
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.
I think we might want to add a pointer to the composite type to let you customize behaviour in some cases. Fix #100