This is an automated email from the ASF dual-hosted git repository.
zhaoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4391152 Make variable argument UDAF work (#1982)
4391152 is described below
commit 43911521682010d0dfa1a4989e42606ef7a777c7
Author: WingC <[email protected]>
AuthorDate: Tue Oct 15 09:24:53 2019 +0800
Make variable argument UDAF work (#1982)
---
be/src/exprs/new_agg_fn_evaluator.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/be/src/exprs/new_agg_fn_evaluator.cc
b/be/src/exprs/new_agg_fn_evaluator.cc
index d92eabf..b5f605d 100644
--- a/be/src/exprs/new_agg_fn_evaluator.cc
+++ b/be/src/exprs/new_agg_fn_evaluator.cc
@@ -409,6 +409,12 @@ void NewAggFnEvaluator::Update(const TupleRow* row, Tuple*
dst, void* fn) {
DCHECK(input_evals_[i]->root() == agg_fn_.get_child(i));
AnyValUtil::set_any_val(src_slot, agg_fn_.get_child(i)->type(),
staging_input_vals_[i]);
}
+ if (agg_fn_.is_merge()) {
+ reinterpret_cast<UpdateFn1>(fn)(agg_fn_ctx_.get(),
+ *staging_input_vals_[0],
staging_intermediate_val_);
+ SetDstSlot(staging_intermediate_val_, slot_desc, dst);
+ return;
+ }
// TODO: this part is not so good and not scalable. It can be replaced with
// codegen but we can also consider leaving it for the first few cases for
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]