Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-119]allow to config batchsize in hashagg and wscg #222

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ class HashAggregateKernel::Impl {
finish_ss << "if(do_hash_aggr_finish_" << level << ") {";
for (int i = 0; i < action_idx; i++) {
finish_ss << "aggr_action_list_" << level << "[" << i
<< "]->Finish(do_hash_aggr_finish_" << level
<< "_offset, 10000, &do_hash_aggr_finish_" << level << "_out);"
<< "]->Finish(do_hash_aggr_finish_" << level << "_offset,"
<< GetBatchSize() << ", &do_hash_aggr_finish_" << level << "_out);"
<< std::endl;
}
finish_ss << "if (do_hash_aggr_finish_" << level << "_out.size() > 0) {" << std::endl;
Expand Down Expand Up @@ -755,7 +755,7 @@ class HashAggregateKernel::Impl {
int gp_idx = 0;
std::vector<std::shared_ptr<arrow::Array>> outputs;
for (auto action : action_impl_list_) {
action->Finish(offset_, 10000, &outputs);
action->Finish(offset_, GetBatchSize(), &outputs);
}
if (outputs.size() > 0) {
out_length += outputs[0]->length();
Expand Down Expand Up @@ -911,7 +911,7 @@ class HashAggregateKernel::Impl {
int gp_idx = 0;
std::vector<std::shared_ptr<arrow::Array>> outputs;
for (auto action : action_impl_list_) {
action->Finish(offset_, 10000, &outputs);
action->Finish(offset_, GetBatchSize(), &outputs);
}
if (outputs.size() > 0) {
out_length += outputs[0]->length();
Expand Down Expand Up @@ -1065,7 +1065,7 @@ class HashAggregateKernel::Impl {
int gp_idx = 0;
std::vector<std::shared_ptr<arrow::Array>> outputs;
for (auto action : action_impl_list_) {
action->Finish(offset_, 10000, &outputs);
action->Finish(offset_, GetBatchSize(), &outputs);
}
if (outputs.size() > 0) {
out_length += outputs[0]->length();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ class TypedWholeStageCodeGenImpl : public CodeGenBase {
for (int i = 0; i < length; i++) {
)" << std::endl;
} else {
codes_ss << "while (!should_stop_ && out_length < 10000) {" << std::endl;
codes_ss << "while (!should_stop_ && out_length < " << GetBatchSize() << ") {"
<< std::endl;
}
// input preparation
for (int i = 0; i < input_field_list.size(); i++) {
Expand Down Expand Up @@ -664,4 +665,4 @@ std::string WholeStageCodeGenKernel::GetSignature() { return impl_->GetSignature
} // namespace extra
} // namespace arrowcompute
} // namespace codegen
} // namespace sparkcolumnarplugin
} // namespace sparkcolumnarplugin