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-15506: [C++][Compute] Support Null type in hash_sum/hash_product/hash_mean #12299
Conversation
std::shared_ptr<DataType> out_type() const override { return float64(); } | ||
|
||
void output_empty(const std::shared_ptr<Buffer>& data) override { | ||
std::memset(data->mutable_data(), 0, num_groups_ * sizeof(double)); |
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'd rather use std::fill_n(double*, ...)
here for clarity.
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.
@pitrou, memset
is replaced with fill_n
.
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.
Benchmark runs are scheduled for baseline = 3f9daeb and contender = 9e8ac56. 9e8ac56 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
…t/hash_mean - If min_count == 0 and skip_nulls == true `hash_sum` returns an int64 scalar of 0, otherwise return a int64 scalar of null - If min_count == 0 and skip_nulls == true `hash_product` returns an int64 scalar of 1, otherwise return a int64 scalar of null - If min_count == 0 and skip_nulls == true `hash_mean` returns an float64 scalar of 0, otherwise return a float64 scalar of null Closes apache#12299 from Crystrix/arrow-15506 Authored-by: Chenxi Li <chenxi.li@live.com> Signed-off-by: David Li <li.davidm96@gmail.com>
hash_sum
returns an int64 scalar of 0, otherwise return a int64 scalar of nullhash_product
returns an int64 scalar of 1, otherwise return a int64 scalar of nullhash_mean
returns an float64 scalar of 0, otherwise return a float64 scalar of null