-
Notifications
You must be signed in to change notification settings - Fork 847
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
fix: new_null_array for structs #736
Conversation
.map(|field| ArrayData::new_empty(field.data_type())) | ||
.collect(), | ||
)), | ||
.map(|field| (field.clone(), new_null_array(field.data_type(), length))) |
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.
One concern I have is that this creates a new null array for the field even if the field was non-nullable. I think that is OK because the enclosing struct
is null at all those points, but wasn't 100% sure.
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.
@nevi-me is the expert here. I believe the nullability is passed from parent to child so your assumption is correct
Codecov Report
@@ Coverage Diff @@
## master #736 +/- ##
==========================================
+ Coverage 82.47% 82.48% +0.01%
==========================================
Files 168 168
Lines 47690 47701 +11
==========================================
+ Hits 39330 39347 +17
+ Misses 8360 8354 -6
Continue to review full report at Codecov.
|
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.
Thanks @bjchambers !
Which issue does this PR close?
Closes #734.
Rationale for this change
new_null_array
should produce a valid array when used withDataType::Struct
What changes are included in this PR?
Previously failing, now passing test demonstrating that
new_null_array
returned a struct array with invalid lengths.Are there any user-facing changes?