-
Notifications
You must be signed in to change notification settings - Fork 135
Exporting struct array to arrow respects vortex nullabilty #6365
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,12 +115,13 @@ impl ComputeFnVTable for MaskFn { | |
| ) -> VortexResult<Output> { | ||
| let MaskArgs { array, mask } = MaskArgs::try_from(args)?; | ||
|
|
||
| if matches!(mask, Mask::AllFalse(_)) { | ||
| let mask_true_count = mask.true_count(); | ||
| if mask_true_count == 0 { | ||
| // Fast-path for empty mask | ||
| return Ok(cast(array, &array.dtype().as_nullable())?.into()); | ||
| } | ||
|
|
||
| if matches!(mask, Mask::AllTrue(_)) { | ||
| if mask_true_count == mask.len() { | ||
|
Comment on lines
+118
to
+124
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a east and common mistake to make are you sure it exists?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why was this necessary?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the nice thing about the old version was that it avoided scanning the indices for the fast paths |
||
| // Fast-path for full mask. | ||
| return Ok( | ||
| ConstantArray::new(Scalar::null(array.dtype().as_nullable()), array.len()) | ||
|
|
||
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.
keep these as seperate they share cached state