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-14050: [C++] Make TDigest/Quantile kernels return nulls instead #11199
Conversation
Thanks for doing this @lidavidm! I'll test this with the R bindings later today. |
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. Just one question.
for (const auto& ty : {float64(), int64(), uint64()}) { | ||
QuantileOptions options(std::vector<double>{0.0, 0.5, 1.0}); | ||
EXPECT_THAT(Quantile(*MakeScalar(ty, 1), options), | ||
ResultWith(ArrayFromJSON(float64(), "[1.0, 1.0, 1.0]"))); |
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.
Did you mean to also test with a null scalar here?
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.
Yes, added (also added to TDigest's tests)
Works great from the R bindings. Thanks! |
This wraps the tdigest aggregation to make it easier for bindings to use. This PR is on top of ARROW-14050 (#11199). Closes #11204 from lidavidm/arrow-14052 Authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
As requested, this makes it so that TDigest/Quantile return nulls instead of empty arrays, making them easier to consume from bindings, and making them compose better with kernels like list_flatten and list_element. Closes apache#11199 from lidavidm/arrow-14050 Authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
This wraps the tdigest aggregation to make it easier for bindings to use. This PR is on top of ARROW-14050 (apache#11199). Closes apache#11204 from lidavidm/arrow-14052 Authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
As requested, this makes it so that TDigest/Quantile return nulls instead of empty arrays, making them easier to consume from bindings, and making them compose better with kernels like list_flatten and list_element.