You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/04 03:11:08 UTC

[GitHub] [doris] qzsee commented on a diff in pull request #14787: [Refactor](pipeline) Refactor operator and builder code of pipeline

qzsee commented on code in PR #14787:
URL: https://github.com/apache/doris/pull/14787#discussion_r1038901162


##########
be/src/pipeline/exec/aggregation_source_operator.cpp:
##########
@@ -22,46 +22,7 @@
 namespace doris {
 namespace pipeline {
 
-AggregationSourceOperator::AggregationSourceOperator(OperatorBuilder* templ,
-                                                     vectorized::AggregationNode* node)
-        : Operator(templ), _agg_node(node) {}
-
-Status AggregationSourceOperator::prepare(RuntimeState* state) {
-    _agg_node->increase_ref();
-    return Status::OK();
-}
-
-bool AggregationSourceOperator::can_read() {
-    return _agg_node->can_read();
-}
-
-Status AggregationSourceOperator::get_block(RuntimeState* state, vectorized::Block* block,
-                                            SourceState& source_state) {
-    SCOPED_TIMER(_runtime_profile->total_time_counter());
-    bool eos = false;
-    RETURN_IF_ERROR(_agg_node->pull(state, block, &eos));
-    source_state = eos ? SourceState::FINISHED : SourceState::DEPEND_ON_SOURCE;
-    return Status::OK();
-}
-
-Status AggregationSourceOperator::close(RuntimeState* state) {
-    _fresh_exec_timer(_agg_node);
-    if (!_agg_node->decrease_ref()) {
-        _agg_node->release_resource(state);
-    }
-    return Status::OK();
-}
-
-///////////////////////////////  operator template  ////////////////////////////////
-
-AggregationSourceOperatorBuilder::AggregationSourceOperatorBuilder(
-        int32_t id, const std::string& name, vectorized::AggregationNode* exec_node)
-        : OperatorBuilder(id, name, exec_node) {}
-
-OperatorPtr AggregationSourceOperatorBuilder::build_operator() {
-    return std::make_shared<AggregationSourceOperator>(
-            this, assert_cast<vectorized::AggregationNode*>(_related_exec_node));
-}
+OPERATOR_CODE_GENERATOR(AggregationSourceOperator, Operator)

Review Comment:
   AggregationSourceOperator -> AggSourceOperator ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org