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.
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
ARROW-11599: [Rust] Add function to create array with all nulls #9469
ARROW-11599: [Rust] Add function to create array with all nulls #9469
Changes from all commits
3bdeb1b
0249960
cd039f0
920e0b7
0a4fa56
72125dd
8c45e47
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a soundness hole here, that applies more for parquet. If I created this array as non-nullable, there wouldn't have been an error, even though this doesn't comply with the spec.
@alamb @jorgecarleitao @Dandandan should we panic, or should I change the signature to
Result<ArrayRef>
so I can validate this condition?I'm leaning to a panic, just like we panic on
impl From<ArrayDataRef> for {type}Array
. Wrapping a function that doesn't really error out, in a Result feels like assembing the Avengers for a single villain.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote
panic
for now if you think it is a logic error that a user should be avoiding anyways.Or alternately, we can make it
panic
now andResult
later if someone finds a needThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that hole exists in so many places, unfortunately. Since
ArrayData
has anull_count
, we have been relying on it for this.Technically, this goes back to the issue that we are not performing any validation whether the datatype is consistent with the array's content. :(