-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Reduce repetition in Decimal binary kernels, upgrade to arrow 11.1 #2107
Conversation
} | ||
} | ||
Ok(bool_builder.finish()) | ||
compare_decimal_scalar(left, right, |left, right| left == right) |
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.
This PR simply refactors out the common iteration over inputs into compare_decimal
and compare_decimal_scalar
FYI @liukun4515 |
af284b0
to
45758eb
Compare
Draft until I can debug CI failure |
Blocked by upstream issue in arrow-rs: apache/arrow-rs#1506 |
{ | ||
Ok(left | ||
.iter() | ||
.map(|left| left.map(|left| op(left, right))) |
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.
Does this iter need sized
?
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 think the call to collect()
eventually needs the iterator to be sized (so it knows how large an array to allocate)
45758eb
to
3c582d1
Compare
Rationale
I noticed some things that could be written "more nicely" while trolling through the code for other reasons and figured I would sneak in some coding (rather than review)
I think this also makes it easier to port this code to arrow-rs eventually: apache/arrow-rs#1200
Changes:
11.1
as it requires Implementsize_hint
andExactSizedIterator
forDecimalArray
arrow-rs#1506