[New Featrue] Support Vectorization Execution Engine Interface For Doris (#6329)
1. FE vectorized plan code 2. Function register vec function 3. Diff function nullable type 4. New thirdparty code and new thrift struct
This commit is contained in:
@ -19,7 +19,6 @@
|
||||
|
||||
#include <gperftools/profiler.h>
|
||||
#include <math.h>
|
||||
#include <thrift/protocol/TDebugProtocol.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@ -223,6 +222,15 @@ Status AggregationNode::open(RuntimeState* state) {
|
||||
}
|
||||
|
||||
Status AggregationNode::get_next(RuntimeState* state, RowBatch* row_batch, bool* eos) {
|
||||
// 1. `!need_finalize` means this aggregation node not the level two aggregation node
|
||||
// 2. `_singleton_output_tuple != nullptr` means is not group by
|
||||
// 3. `child(0)->rows_returned() == 0` mean not data from child
|
||||
// in level two aggregation node should return NULL result
|
||||
// level one aggregation node set `eos = true` return directly
|
||||
if (UNLIKELY(!_needs_finalize && _singleton_output_tuple != nullptr && child(0)->rows_returned() == 0)) {
|
||||
*eos = true;
|
||||
return Status::OK();
|
||||
}
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::GETNEXT));
|
||||
RETURN_IF_CANCELLED(state);
|
||||
@ -403,7 +411,8 @@ Tuple* AggregationNode::finalize_tuple(Tuple* tuple, MemPool* pool) {
|
||||
dst = Tuple::create(_output_tuple_desc->byte_size(), pool);
|
||||
}
|
||||
if (_needs_finalize) {
|
||||
AggFnEvaluator::finalize(_aggregate_evaluators, _agg_fn_ctxs, tuple, dst);
|
||||
AggFnEvaluator::finalize(_aggregate_evaluators, _agg_fn_ctxs, tuple, dst,
|
||||
_singleton_output_tuple != nullptr && child(0)->rows_returned() == 0);
|
||||
} else {
|
||||
AggFnEvaluator::serialize(_aggregate_evaluators, _agg_fn_ctxs, tuple);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user