-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 NULL values in FixedSizeList creation #9141
Conversation
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 @Weijun-H -- this looks great
cc @jayzhan211
let capacity = Capacities::Array(arrays.iter().map(|arr| arr.len()).sum()); | ||
let capacity = Capacities::Array( | ||
arrays | ||
.iter() |
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.
was thinking if filter_map will be handy here to avoid double iteration?
arrays.iter().filter_map(|arr| {if arr.is_null(0) {None} else Some(arr.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.
LGTM
Thanks again @Weijun-H and @jayzhan211 |
Which issue does this PR close?
Closes #9094
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?