Coverage Report

Created: 2026-03-20 08:01

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include "common/status.h"
21
#include "exec/common/util.hpp"
22
#include "exec/exchange/local_exchange_sink_operator.h"
23
#include "exec/exchange/local_exchange_source_operator.h"
24
#include "exec/operator/aggregation_sink_operator.h"
25
#include "exec/operator/aggregation_source_operator.h"
26
#include "exec/operator/analytic_sink_operator.h"
27
#include "exec/operator/analytic_source_operator.h"
28
#include "exec/operator/assert_num_rows_operator.h"
29
#include "exec/operator/blackhole_sink_operator.h"
30
#include "exec/operator/cache_sink_operator.h"
31
#include "exec/operator/cache_source_operator.h"
32
#include "exec/operator/datagen_operator.h"
33
#include "exec/operator/dict_sink_operator.h"
34
#include "exec/operator/distinct_streaming_aggregation_operator.h"
35
#include "exec/operator/empty_set_operator.h"
36
#include "exec/operator/es_scan_operator.h"
37
#include "exec/operator/exchange_sink_operator.h"
38
#include "exec/operator/exchange_source_operator.h"
39
#include "exec/operator/file_scan_operator.h"
40
#include "exec/operator/group_commit_block_sink_operator.h"
41
#include "exec/operator/group_commit_scan_operator.h"
42
#include "exec/operator/hashjoin_build_sink.h"
43
#include "exec/operator/hashjoin_probe_operator.h"
44
#include "exec/operator/hive_table_sink_operator.h"
45
#include "exec/operator/iceberg_table_sink_operator.h"
46
#include "exec/operator/jdbc_scan_operator.h"
47
#include "exec/operator/jdbc_table_sink_operator.h"
48
#include "exec/operator/local_merge_sort_source_operator.h"
49
#include "exec/operator/materialization_opertor.h"
50
#include "exec/operator/maxcompute_table_sink_operator.h"
51
#include "exec/operator/memory_scratch_sink_operator.h"
52
#include "exec/operator/meta_scan_operator.h"
53
#include "exec/operator/mock_operator.h"
54
#include "exec/operator/mock_scan_operator.h"
55
#include "exec/operator/multi_cast_data_stream_sink.h"
56
#include "exec/operator/multi_cast_data_stream_source.h"
57
#include "exec/operator/nested_loop_join_build_operator.h"
58
#include "exec/operator/nested_loop_join_probe_operator.h"
59
#include "exec/operator/olap_scan_operator.h"
60
#include "exec/operator/olap_table_sink_operator.h"
61
#include "exec/operator/olap_table_sink_v2_operator.h"
62
#include "exec/operator/partition_sort_sink_operator.h"
63
#include "exec/operator/partition_sort_source_operator.h"
64
#include "exec/operator/partitioned_aggregation_sink_operator.h"
65
#include "exec/operator/partitioned_aggregation_source_operator.h"
66
#include "exec/operator/partitioned_hash_join_probe_operator.h"
67
#include "exec/operator/partitioned_hash_join_sink_operator.h"
68
#include "exec/operator/rec_cte_anchor_sink_operator.h"
69
#include "exec/operator/rec_cte_scan_operator.h"
70
#include "exec/operator/rec_cte_sink_operator.h"
71
#include "exec/operator/rec_cte_source_operator.h"
72
#include "exec/operator/repeat_operator.h"
73
#include "exec/operator/result_file_sink_operator.h"
74
#include "exec/operator/result_sink_operator.h"
75
#include "exec/operator/schema_scan_operator.h"
76
#include "exec/operator/select_operator.h"
77
#include "exec/operator/set_probe_sink_operator.h"
78
#include "exec/operator/set_sink_operator.h"
79
#include "exec/operator/set_source_operator.h"
80
#include "exec/operator/sort_sink_operator.h"
81
#include "exec/operator/sort_source_operator.h"
82
#include "exec/operator/spill_iceberg_table_sink_operator.h"
83
#include "exec/operator/spill_sort_sink_operator.h"
84
#include "exec/operator/spill_sort_source_operator.h"
85
#include "exec/operator/streaming_aggregation_operator.h"
86
#include "exec/operator/table_function_operator.h"
87
#include "exec/operator/tvf_table_sink_operator.h"
88
#include "exec/operator/union_sink_operator.h"
89
#include "exec/operator/union_source_operator.h"
90
#include "exec/pipeline/dependency.h"
91
#include "exec/pipeline/pipeline.h"
92
#include "exprs/vexpr.h"
93
#include "exprs/vexpr_context.h"
94
#include "runtime/runtime_profile.h"
95
#include "runtime/runtime_profile_counter_names.h"
96
#include "util/debug_util.h"
97
#include "util/string_util.h"
98
99
namespace doris {
100
#include "common/compile_check_begin.h"
101
class RowDescriptor;
102
class RuntimeState;
103
} // namespace doris
104
105
namespace doris {
106
107
0
Status OperatorBase::close(RuntimeState* state) {
108
0
    if (_is_closed) {
109
0
        return Status::OK();
110
0
    }
111
0
    _is_closed = true;
112
0
    return Status::OK();
113
0
}
114
115
template <typename SharedStateArg>
116
2.45M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
2.45M
    if (_parent->nereids_id() == -1) {
118
1.26M
        return fmt::format("(id={})", _parent->node_id());
119
1.26M
    } else {
120
1.19M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
1.19M
    }
122
2.45M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
145k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
145k
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
145k
    } else {
120
145k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
145k
    }
122
145k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
1
    if (_parent->nereids_id() == -1) {
118
1
        return fmt::format("(id={})", _parent->node_id());
119
1
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
269k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
269k
    if (_parent->nereids_id() == -1) {
118
12
        return fmt::format("(id={})", _parent->node_id());
119
269k
    } else {
120
269k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
269k
    }
122
269k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
24
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
24
    } else {
120
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
24
    }
122
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
10.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
10.4k
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
10.4k
    } else {
120
10.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
10.4k
    }
122
10.4k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
8.16k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
8.16k
    if (_parent->nereids_id() == -1) {
118
9
        return fmt::format("(id={})", _parent->node_id());
119
8.15k
    } else {
120
8.15k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
8.15k
    }
122
8.16k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
170k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
170k
    if (_parent->nereids_id() == -1) {
118
27
        return fmt::format("(id={})", _parent->node_id());
119
170k
    } else {
120
170k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
170k
    }
122
170k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
1.34k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
1.34k
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
1.34k
    } else {
120
1.34k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
1.34k
    }
122
1.34k
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
1.00M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
1.00M
    if (_parent->nereids_id() == -1) {
118
485k
        return fmt::format("(id={})", _parent->node_id());
119
523k
    } else {
120
523k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
523k
    }
122
1.00M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
55.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
55.8k
    if (_parent->nereids_id() == -1) {
118
2
        return fmt::format("(id={})", _parent->node_id());
119
55.8k
    } else {
120
55.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
55.8k
    }
122
55.8k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
110
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
110
    if (_parent->nereids_id() == -1) {
118
110
        return fmt::format("(id={})", _parent->node_id());
119
110
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
110
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
13.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
13.8k
    if (_parent->nereids_id() == -1) {
118
13.8k
        return fmt::format("(id={})", _parent->node_id());
119
13.8k
    } else {
120
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
1
    }
122
13.8k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
568
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
568
    if (_parent->nereids_id() == -1) {
118
102
        return fmt::format("(id={})", _parent->node_id());
119
466
    } else {
120
466
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
466
    }
122
568
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
5.20k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
5.20k
    if (_parent->nereids_id() == -1) {
118
10
        return fmt::format("(id={})", _parent->node_id());
119
5.19k
    } else {
120
5.19k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
5.19k
    }
122
5.20k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
765k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
765k
    if (_parent->nereids_id() == -1) {
118
764k
        return fmt::format("(id={})", _parent->node_id());
119
764k
    } else {
120
577
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
577
    }
122
765k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
150
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
150
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
150
    } else {
120
150
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
150
    }
122
150
}
123
124
template <typename SharedStateArg>
125
1.53M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
1.53M
    if (_parent->nereids_id() == -1) {
127
870k
        return fmt::format("(id={})", _parent->node_id());
128
870k
    } else {
129
664k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
664k
    }
131
1.53M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
193k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
193k
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
193k
    } else {
129
193k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
193k
    }
131
193k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
2
    if (_parent->nereids_id() == -1) {
127
1
        return fmt::format("(id={})", _parent->node_id());
128
1
    } else {
129
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
1
    }
131
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
270k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
270k
    if (_parent->nereids_id() == -1) {
127
9
        return fmt::format("(id={})", _parent->node_id());
128
270k
    } else {
129
270k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
270k
    }
131
270k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
30
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
30
    } else {
129
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
30
    }
131
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
10.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
10.4k
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
10.4k
    } else {
129
10.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
10.4k
    }
131
10.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
8.17k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
8.17k
    if (_parent->nereids_id() == -1) {
127
9
        return fmt::format("(id={})", _parent->node_id());
128
8.16k
    } else {
129
8.16k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
8.16k
    }
131
8.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
170k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
170k
    if (_parent->nereids_id() == -1) {
127
27
        return fmt::format("(id={})", _parent->node_id());
128
170k
    } else {
129
170k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
170k
    }
131
170k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
1.35k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
1.35k
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
1.35k
    } else {
129
1.35k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
1.35k
    }
131
1.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
92
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
92
    if (_parent->nereids_id() == -1) {
127
92
        return fmt::format("(id={})", _parent->node_id());
128
92
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
92
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
9.19k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
9.19k
    if (_parent->nereids_id() == -1) {
127
3
        return fmt::format("(id={})", _parent->node_id());
128
9.19k
    } else {
129
9.19k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
9.19k
    }
131
9.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
568
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
568
    if (_parent->nereids_id() == -1) {
127
102
        return fmt::format("(id={})", _parent->node_id());
128
466
    } else {
129
466
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
466
    }
131
568
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
12.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
12.7k
    if (_parent->nereids_id() == -1) {
127
12.7k
        return fmt::format("(id={})", _parent->node_id());
128
18.4E
    } else {
129
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
18.4E
    }
131
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
331k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
331k
    if (_parent->nereids_id() == -1) {
127
331k
        return fmt::format("(id={})", _parent->node_id());
128
18.4E
    } else {
129
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
18.4E
    }
131
331k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
525k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
525k
    if (_parent->nereids_id() == -1) {
127
525k
        return fmt::format("(id={})", _parent->node_id());
128
525k
    } else {
129
182
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
182
    }
131
525k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
111
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
111
    if (_parent->nereids_id() == -1) {
127
111
        return fmt::format("(id={})", _parent->node_id());
128
111
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
111
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
299
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
299
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
299
    } else {
129
299
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
299
    }
131
299
}
132
133
template <typename SharedStateArg>
134
32.5k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
32.5k
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
32.5k
    _terminated = true;
139
32.5k
    return Status::OK();
140
32.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
24.0k
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
24.0k
    _terminated = true;
139
24.0k
    return Status::OK();
140
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
913
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
913
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
913
    _terminated = true;
139
913
    return Status::OK();
140
913
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
11
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
11
    _terminated = true;
139
11
    return Status::OK();
140
11
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
2
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
2
    _terminated = true;
139
2
    return Status::OK();
140
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
4.83k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
4.83k
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
4.83k
    _terminated = true;
139
4.83k
    return Status::OK();
140
4.83k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
2.28k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
2.28k
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
2.28k
    _terminated = true;
139
2.28k
    return Status::OK();
140
2.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
4
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
4
    _terminated = true;
139
4
    return Status::OK();
140
4
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
2
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
2
    _terminated = true;
139
2
    return Status::OK();
140
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
124
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
124
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
124
    _terminated = true;
139
124
    return Status::OK();
140
124
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
5
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
5
    _terminated = true;
139
5
    return Status::OK();
140
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
241
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
241
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
241
    _terminated = true;
139
241
    return Status::OK();
140
241
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
133
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
133
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
133
    _terminated = true;
139
133
    return Status::OK();
140
133
}
141
142
899k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
143
899k
    return _child && _child->is_serial_operator() && !is_source()
144
899k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
145
899k
                   : DataDistribution(ExchangeType::NOOP);
146
899k
}
147
148
82.0k
const RowDescriptor& OperatorBase::row_desc() const {
149
82.0k
    return _child->row_desc();
150
82.0k
}
151
152
template <typename SharedStateArg>
153
55.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
55.4k
    fmt::memory_buffer debug_string_buffer;
155
55.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
55.4k
    return fmt::to_string(debug_string_buffer);
157
55.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
64
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
64
    fmt::memory_buffer debug_string_buffer;
155
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
64
    return fmt::to_string(debug_string_buffer);
157
64
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
3
    fmt::memory_buffer debug_string_buffer;
155
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
3
    return fmt::to_string(debug_string_buffer);
157
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
16
    fmt::memory_buffer debug_string_buffer;
155
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
16
    return fmt::to_string(debug_string_buffer);
157
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
16
    fmt::memory_buffer debug_string_buffer;
155
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
16
    return fmt::to_string(debug_string_buffer);
157
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
55.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
55.2k
    fmt::memory_buffer debug_string_buffer;
155
55.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
55.2k
    return fmt::to_string(debug_string_buffer);
157
55.2k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
1
    fmt::memory_buffer debug_string_buffer;
155
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
1
    return fmt::to_string(debug_string_buffer);
157
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
144
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
144
    fmt::memory_buffer debug_string_buffer;
155
144
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
144
    return fmt::to_string(debug_string_buffer);
157
144
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
158
159
template <typename SharedStateArg>
160
55.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
55.3k
    fmt::memory_buffer debug_string_buffer;
162
55.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
55.3k
    return fmt::to_string(debug_string_buffer);
164
55.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
160
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
16
    fmt::memory_buffer debug_string_buffer;
162
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
16
    return fmt::to_string(debug_string_buffer);
164
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
160
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
16
    fmt::memory_buffer debug_string_buffer;
162
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
16
    return fmt::to_string(debug_string_buffer);
164
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
160
80
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
80
    fmt::memory_buffer debug_string_buffer;
162
80
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
80
    return fmt::to_string(debug_string_buffer);
164
80
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
160
81
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
81
    fmt::memory_buffer debug_string_buffer;
162
81
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
81
    return fmt::to_string(debug_string_buffer);
164
81
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
160
55.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
55.1k
    fmt::memory_buffer debug_string_buffer;
162
55.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
55.1k
    return fmt::to_string(debug_string_buffer);
164
55.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
165
166
55.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
167
55.5k
    fmt::memory_buffer debug_string_buffer;
168
55.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
169
55.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
170
55.5k
                   _is_serial_operator);
171
55.5k
    return fmt::to_string(debug_string_buffer);
172
55.5k
}
173
174
55.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
175
55.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
176
55.4k
}
177
178
762k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
179
762k
    std::string node_name = print_plan_node_type(tnode.node_type);
180
762k
    _nereids_id = tnode.nereids_id;
181
762k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
182
3.03k
        if (!tnode.__isset.output_tuple_id) {
183
0
            return Status::InternalError("no final output tuple id");
184
0
        }
185
3.03k
        if (tnode.intermediate_output_tuple_id_list.size() !=
186
3.03k
            tnode.intermediate_projections_list.size()) {
187
0
            return Status::InternalError(
188
0
                    "intermediate_output_tuple_id_list size:{} not match "
189
0
                    "intermediate_projections_list size:{}",
190
0
                    tnode.intermediate_output_tuple_id_list.size(),
191
0
                    tnode.intermediate_projections_list.size());
192
0
        }
193
3.03k
    }
194
762k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
195
762k
    _op_name = substr + "_OPERATOR";
196
197
762k
    if (tnode.__isset.vconjunct) {
198
0
        return Status::InternalError("vconjunct is not supported yet");
199
762k
    } else if (tnode.__isset.conjuncts) {
200
443k
        for (const auto& conjunct : tnode.conjuncts) {
201
443k
            VExprContextSPtr context;
202
443k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
203
443k
            _conjuncts.emplace_back(context);
204
443k
        }
205
142k
    }
206
207
    // create the projections expr
208
762k
    if (tnode.__isset.projections) {
209
327k
        DCHECK(tnode.__isset.output_tuple_id);
210
327k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
211
327k
    }
212
762k
    if (!tnode.intermediate_projections_list.empty()) {
213
3.03k
        DCHECK(tnode.__isset.projections) << "no final projections";
214
3.03k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
215
4.13k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
216
4.13k
            VExprContextSPtrs projections;
217
4.13k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
218
4.13k
            _intermediate_projections.push_back(projections);
219
4.13k
        }
220
3.03k
    }
221
762k
    return Status::OK();
222
762k
}
223
224
795k
Status OperatorXBase::prepare(RuntimeState* state) {
225
795k
    for (auto& conjunct : _conjuncts) {
226
443k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
227
443k
    }
228
795k
    if (state->enable_adjust_conjunct_order_by_cost()) {
229
745k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
230
601k
            return a->execute_cost() < b->execute_cost();
231
601k
        });
232
745k
    };
233
234
799k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
235
4.13k
        RETURN_IF_ERROR(
236
4.13k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
237
4.13k
    }
238
795k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
239
240
795k
    if (has_output_row_desc()) {
241
327k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
242
327k
    }
243
244
795k
    for (auto& conjunct : _conjuncts) {
245
442k
        RETURN_IF_ERROR(conjunct->open(state));
246
442k
    }
247
795k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
248
795k
    for (auto& projections : _intermediate_projections) {
249
4.13k
        RETURN_IF_ERROR(VExpr::open(projections, state));
250
4.13k
    }
251
795k
    if (_child && !is_source()) {
252
150k
        RETURN_IF_ERROR(_child->prepare(state));
253
150k
    }
254
255
795k
    if (VExpr::contains_blockable_function(_conjuncts) ||
256
795k
        VExpr::contains_blockable_function(_projections)) {
257
0
        _blockable = true;
258
0
    }
259
260
795k
    return Status::OK();
261
795k
}
262
263
11.1k
Status OperatorXBase::terminate(RuntimeState* state) {
264
11.1k
    if (_child && !is_source()) {
265
2.59k
        RETURN_IF_ERROR(_child->terminate(state));
266
2.59k
    }
267
11.1k
    auto result = state->get_local_state_result(operator_id());
268
11.1k
    if (!result) {
269
0
        return result.error();
270
0
    }
271
11.1k
    return result.value()->terminate(state);
272
11.1k
}
273
274
7.08M
Status OperatorXBase::close(RuntimeState* state) {
275
7.08M
    if (_child && !is_source()) {
276
1.39M
        RETURN_IF_ERROR(_child->close(state));
277
1.39M
    }
278
7.08M
    auto result = state->get_local_state_result(operator_id());
279
7.08M
    if (!result) {
280
0
        return result.error();
281
0
    }
282
7.08M
    return result.value()->close(state);
283
7.08M
}
284
285
375k
void PipelineXLocalStateBase::clear_origin_block() {
286
375k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
287
375k
}
288
289
638k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
290
638k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
291
292
638k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
293
638k
    return Status::OK();
294
638k
}
295
296
0
bool PipelineXLocalStateBase::is_blockable() const {
297
0
    return std::any_of(_projections.begin(), _projections.end(),
298
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
299
0
}
300
301
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
302
375k
                                     Block* output_block) const {
303
375k
    auto* local_state = state->get_local_state(operator_id());
304
375k
    SCOPED_TIMER(local_state->exec_time_counter());
305
375k
    SCOPED_TIMER(local_state->_projection_timer);
306
375k
    const size_t rows = origin_block->rows();
307
375k
    if (rows == 0) {
308
232k
        return Status::OK();
309
232k
    }
310
142k
    Block input_block = *origin_block;
311
312
142k
    size_t bytes_usage = 0;
313
142k
    ColumnsWithTypeAndName new_columns;
314
142k
    for (const auto& projections : local_state->_intermediate_projections) {
315
1.09k
        if (projections.empty()) {
316
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
317
0
                                         node_id());
318
0
        }
319
1.09k
        new_columns.resize(projections.size());
320
7.73k
        for (int i = 0; i < projections.size(); i++) {
321
6.63k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
322
6.63k
            if (new_columns[i].column->size() != rows) {
323
0
                return Status::InternalError(
324
0
                        "intermediate projection result column size {} not equal input rows {}, "
325
0
                        "expr: {}",
326
0
                        new_columns[i].column->size(), rows,
327
0
                        projections[i]->root()->debug_string());
328
0
            }
329
6.63k
        }
330
1.09k
        Block tmp_block {new_columns};
331
1.09k
        bytes_usage += tmp_block.allocated_bytes();
332
1.09k
        input_block.swap(tmp_block);
333
1.09k
    }
334
335
142k
    if (input_block.rows() != rows) {
336
0
        return Status::InternalError(
337
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
338
0
                "input_block: {}",
339
0
                input_block.rows(), rows, input_block.dump_structure());
340
0
    }
341
734k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
342
734k
        if (to->is_nullable() && !from->is_nullable()) {
343
0
            if (_keep_origin || !from->is_exclusive()) {
344
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
345
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
346
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
347
0
                bytes_usage += null_column.allocated_bytes();
348
0
            } else {
349
0
                to = make_nullable(from, false)->assume_mutable();
350
0
            }
351
734k
        } else {
352
734k
            if (_keep_origin || !from->is_exclusive()) {
353
723k
                to->insert_range_from(*from, 0, rows);
354
723k
                bytes_usage += from->allocated_bytes();
355
723k
            } else {
356
11.2k
                to = from->assume_mutable();
357
11.2k
            }
358
734k
        }
359
734k
    };
360
361
142k
    MutableBlock mutable_block =
362
142k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
363
142k
    if (rows != 0) {
364
142k
        auto& mutable_columns = mutable_block.mutable_columns();
365
142k
        const size_t origin_columns_count = input_block.columns();
366
142k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
367
876k
        for (int i = 0; i < mutable_columns.size(); ++i) {
368
734k
            auto result_column_id = -1;
369
734k
            ColumnPtr column_ptr;
370
734k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
734k
            if (column_ptr->size() != rows) {
372
0
                return Status::InternalError(
373
0
                        "projection result column size {} not equal input rows {}, expr: {}",
374
0
                        column_ptr->size(), rows,
375
0
                        local_state->_projections[i]->root()->debug_string());
376
0
            }
377
734k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
734k
            if (result_column_id >= origin_columns_count) {
379
734k
                bytes_usage += column_ptr->allocated_bytes();
380
734k
            }
381
734k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
382
734k
        }
383
142k
        DCHECK(mutable_block.rows() == rows);
384
142k
        output_block->set_columns(std::move(mutable_columns));
385
142k
    }
386
387
142k
    local_state->_estimate_memory_usage += bytes_usage;
388
389
142k
    return Status::OK();
390
142k
}
391
392
4.33M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
393
4.33M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
394
4.33M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
395
4.33M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
396
4.33M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
397
4.33M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
398
4.33M
            if (_debug_point_count++ % 2 == 0) {
399
4.33M
                return Status::OK();
400
4.33M
            }
401
4.33M
        }
402
4.33M
    });
403
404
4.33M
    Status status;
405
4.33M
    auto* local_state = state->get_local_state(operator_id());
406
4.33M
    Defer defer([&]() {
407
4.33M
        if (status.ok()) {
408
4.33M
            if (auto rows = block->rows()) {
409
941k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
410
941k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
411
941k
            }
412
4.33M
        }
413
4.33M
    });
414
4.33M
    if (_output_row_descriptor) {
415
374k
        local_state->clear_origin_block();
416
374k
        status = get_block(state, &local_state->_origin_block, eos);
417
374k
        if (UNLIKELY(!status.ok())) {
418
13
            return status;
419
13
        }
420
374k
        status = do_projections(state, &local_state->_origin_block, block);
421
374k
        return status;
422
374k
    }
423
3.96M
    status = get_block(state, block, eos);
424
3.96M
    RETURN_IF_ERROR(block->check_type_and_column());
425
3.96M
    return status;
426
3.96M
}
427
428
3.21M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
429
3.21M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
430
5.24k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
431
5.24k
        *eos = true;
432
5.24k
    }
433
434
3.21M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
435
3.21M
        auto op_name = to_lower(_parent->_op_name);
436
3.21M
        auto arg_op_name = dp->param<std::string>("op_name");
437
3.21M
        arg_op_name = to_lower(arg_op_name);
438
439
3.21M
        if (op_name == arg_op_name) {
440
3.21M
            *eos = true;
441
3.21M
        }
442
3.21M
    });
443
444
3.21M
    if (auto rows = block->rows()) {
445
858k
        _num_rows_returned += rows;
446
858k
    }
447
3.21M
}
448
449
32.5k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
450
32.5k
    auto result = state->get_sink_local_state_result();
451
32.5k
    if (!result) {
452
0
        return result.error();
453
0
    }
454
32.5k
    return result.value()->terminate(state);
455
32.5k
}
456
457
55.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
458
55.3k
    fmt::memory_buffer debug_string_buffer;
459
460
55.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
461
55.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
462
55.3k
    return fmt::to_string(debug_string_buffer);
463
55.3k
}
464
465
55.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
466
55.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
467
55.3k
}
468
469
473k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
470
473k
    std::string op_name = "UNKNOWN_SINK";
471
473k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
472
473
473k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
474
473k
        op_name = it->second;
475
473k
    }
476
473k
    _name = op_name + "_OPERATOR";
477
473k
    return Status::OK();
478
473k
}
479
480
218k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
481
218k
    std::string op_name = print_plan_node_type(tnode.node_type);
482
218k
    _nereids_id = tnode.nereids_id;
483
218k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
484
218k
    _name = substr + "_SINK_OPERATOR";
485
218k
    return Status::OK();
486
218k
}
487
488
template <typename LocalStateType>
489
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
490
2.27M
                                                            LocalSinkStateInfo& info) {
491
2.27M
    auto local_state = LocalStateType::create_unique(this, state);
492
2.27M
    RETURN_IF_ERROR(local_state->init(state, info));
493
2.27M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
2.27M
    return Status::OK();
495
2.27M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
193k
                                                            LocalSinkStateInfo& info) {
491
193k
    auto local_state = LocalStateType::create_unique(this, state);
492
193k
    RETURN_IF_ERROR(local_state->init(state, info));
493
193k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
193k
    return Status::OK();
495
193k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
446k
                                                            LocalSinkStateInfo& info) {
491
446k
    auto local_state = LocalStateType::create_unique(this, state);
492
446k
    RETURN_IF_ERROR(local_state->init(state, info));
493
446k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
446k
    return Status::OK();
495
446k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
80
                                                            LocalSinkStateInfo& info) {
491
80
    auto local_state = LocalStateType::create_unique(this, state);
492
80
    RETURN_IF_ERROR(local_state->init(state, info));
493
80
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
80
    return Status::OK();
495
80
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
3
                                                            LocalSinkStateInfo& info) {
491
3
    auto local_state = LocalStateType::create_unique(this, state);
492
3
    RETURN_IF_ERROR(local_state->init(state, info));
493
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
3
    return Status::OK();
495
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
482
                                                            LocalSinkStateInfo& info) {
491
482
    auto local_state = LocalStateType::create_unique(this, state);
492
482
    RETURN_IF_ERROR(local_state->init(state, info));
493
482
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
482
    return Status::OK();
495
482
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
66.0k
                                                            LocalSinkStateInfo& info) {
491
66.0k
    auto local_state = LocalStateType::create_unique(this, state);
492
66.0k
    RETURN_IF_ERROR(local_state->init(state, info));
493
66.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
66.0k
    return Status::OK();
495
66.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
5.76k
                                                            LocalSinkStateInfo& info) {
491
5.76k
    auto local_state = LocalStateType::create_unique(this, state);
492
5.76k
    RETURN_IF_ERROR(local_state->init(state, info));
493
5.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
5.76k
    return Status::OK();
495
5.76k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
5.22k
                                                            LocalSinkStateInfo& info) {
491
5.22k
    auto local_state = LocalStateType::create_unique(this, state);
492
5.22k
    RETURN_IF_ERROR(local_state->init(state, info));
493
5.22k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
5.22k
    return Status::OK();
495
5.22k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
156
                                                            LocalSinkStateInfo& info) {
491
156
    auto local_state = LocalStateType::create_unique(this, state);
492
156
    RETURN_IF_ERROR(local_state->init(state, info));
493
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
156
    return Status::OK();
495
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
3.23k
                                                            LocalSinkStateInfo& info) {
491
3.23k
    auto local_state = LocalStateType::create_unique(this, state);
492
3.23k
    RETURN_IF_ERROR(local_state->init(state, info));
493
3.23k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
3.23k
    return Status::OK();
495
3.23k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
8.16k
                                                            LocalSinkStateInfo& info) {
491
8.16k
    auto local_state = LocalStateType::create_unique(this, state);
492
8.16k
    RETURN_IF_ERROR(local_state->init(state, info));
493
8.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
8.16k
    return Status::OK();
495
8.16k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
89
                                                            LocalSinkStateInfo& info) {
491
89
    auto local_state = LocalStateType::create_unique(this, state);
492
89
    RETURN_IF_ERROR(local_state->init(state, info));
493
89
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
89
    return Status::OK();
495
89
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
270k
                                                            LocalSinkStateInfo& info) {
491
270k
    auto local_state = LocalStateType::create_unique(this, state);
492
270k
    RETURN_IF_ERROR(local_state->init(state, info));
493
270k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
270k
    return Status::OK();
495
270k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
30
                                                            LocalSinkStateInfo& info) {
491
30
    auto local_state = LocalStateType::create_unique(this, state);
492
30
    RETURN_IF_ERROR(local_state->init(state, info));
493
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
30
    return Status::OK();
495
30
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
332k
                                                            LocalSinkStateInfo& info) {
491
332k
    auto local_state = LocalStateType::create_unique(this, state);
492
332k
    RETURN_IF_ERROR(local_state->init(state, info));
493
332k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
332k
    return Status::OK();
495
332k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
170k
                                                            LocalSinkStateInfo& info) {
491
170k
    auto local_state = LocalStateType::create_unique(this, state);
492
170k
    RETURN_IF_ERROR(local_state->init(state, info));
493
170k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
170k
    return Status::OK();
495
170k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
1.35k
                                                            LocalSinkStateInfo& info) {
491
1.35k
    auto local_state = LocalStateType::create_unique(this, state);
492
1.35k
    RETURN_IF_ERROR(local_state->init(state, info));
493
1.35k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
1.35k
    return Status::OK();
495
1.35k
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
734k
                                                            LocalSinkStateInfo& info) {
491
734k
    auto local_state = LocalStateType::create_unique(this, state);
492
734k
    RETURN_IF_ERROR(local_state->init(state, info));
493
734k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
734k
    return Status::OK();
495
734k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
10.4k
                                                            LocalSinkStateInfo& info) {
491
10.4k
    auto local_state = LocalStateType::create_unique(this, state);
492
10.4k
    RETURN_IF_ERROR(local_state->init(state, info));
493
10.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
10.4k
    return Status::OK();
495
10.4k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
9.19k
                                                            LocalSinkStateInfo& info) {
491
9.19k
    auto local_state = LocalStateType::create_unique(this, state);
492
9.19k
    RETURN_IF_ERROR(local_state->init(state, info));
493
9.19k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
9.19k
    return Status::OK();
495
9.19k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
5.15k
                                                            LocalSinkStateInfo& info) {
491
5.15k
    auto local_state = LocalStateType::create_unique(this, state);
492
5.15k
    RETURN_IF_ERROR(local_state->init(state, info));
493
5.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
5.15k
    return Status::OK();
495
5.15k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
466
                                                            LocalSinkStateInfo& info) {
491
466
    auto local_state = LocalStateType::create_unique(this, state);
492
466
    RETURN_IF_ERROR(local_state->init(state, info));
493
466
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
466
    return Status::OK();
495
466
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
4.92k
                                                            LocalSinkStateInfo& info) {
491
4.92k
    auto local_state = LocalStateType::create_unique(this, state);
492
4.92k
    RETURN_IF_ERROR(local_state->init(state, info));
493
4.92k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
4.92k
    return Status::OK();
495
4.92k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
2.56k
                                                            LocalSinkStateInfo& info) {
491
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
492
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
493
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
2.56k
    return Status::OK();
495
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
2.69k
                                                            LocalSinkStateInfo& info) {
491
2.69k
    auto local_state = LocalStateType::create_unique(this, state);
492
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
493
2.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
2.69k
    return Status::OK();
495
2.69k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
2.48k
                                                            LocalSinkStateInfo& info) {
491
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
492
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
493
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
2.48k
    return Status::OK();
495
2.48k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
1
                                                            LocalSinkStateInfo& info) {
491
1
    auto local_state = LocalStateType::create_unique(this, state);
492
1
    RETURN_IF_ERROR(local_state->init(state, info));
493
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
1
    return Status::OK();
495
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
165
                                                            LocalSinkStateInfo& info) {
491
165
    auto local_state = LocalStateType::create_unique(this, state);
492
165
    RETURN_IF_ERROR(local_state->init(state, info));
493
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
165
    return Status::OK();
495
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
108
                                                            LocalSinkStateInfo& info) {
491
108
    auto local_state = LocalStateType::create_unique(this, state);
492
108
    RETURN_IF_ERROR(local_state->init(state, info));
493
108
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
108
    return Status::OK();
495
108
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
104
                                                            LocalSinkStateInfo& info) {
491
104
    auto local_state = LocalStateType::create_unique(this, state);
492
104
    RETURN_IF_ERROR(local_state->init(state, info));
493
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
104
    return Status::OK();
495
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
150
                                                            LocalSinkStateInfo& info) {
491
150
    auto local_state = LocalStateType::create_unique(this, state);
492
150
    RETURN_IF_ERROR(local_state->init(state, info));
493
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
150
    return Status::OK();
495
150
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
150
                                                            LocalSinkStateInfo& info) {
491
150
    auto local_state = LocalStateType::create_unique(this, state);
492
150
    RETURN_IF_ERROR(local_state->init(state, info));
493
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
150
    return Status::OK();
495
150
}
496
497
template <typename LocalStateType>
498
1.90M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
0
                                 LocalExchangeSharedState>) {
501
0
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
0
                                        MultiCastSharedState>) {
504
0
        throw Exception(Status::FatalError("should not reach here!"));
505
1.90M
    } else {
506
1.90M
        auto ss = LocalStateType::SharedStateType::create_shared();
507
1.90M
        ss->id = operator_id();
508
1.90M
        for (auto& dest : dests_id()) {
509
1.89M
            ss->related_op_ids.insert(dest);
510
1.89M
        }
511
1.90M
        return ss;
512
1.90M
    }
513
1.90M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
173k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
173k
    } else {
506
173k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
173k
        ss->id = operator_id();
508
173k
        for (auto& dest : dests_id()) {
509
172k
            ss->related_op_ids.insert(dest);
510
172k
        }
511
173k
        return ss;
512
173k
    }
513
173k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
446k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
446k
    } else {
506
446k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
446k
        ss->id = operator_id();
508
446k
        for (auto& dest : dests_id()) {
509
445k
            ss->related_op_ids.insert(dest);
510
445k
        }
511
446k
        return ss;
512
446k
    }
513
446k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
80
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
80
    } else {
506
80
        auto ss = LocalStateType::SharedStateType::create_shared();
507
80
        ss->id = operator_id();
508
80
        for (auto& dest : dests_id()) {
509
80
            ss->related_op_ids.insert(dest);
510
80
        }
511
80
        return ss;
512
80
    }
513
80
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
3
    } else {
506
3
        auto ss = LocalStateType::SharedStateType::create_shared();
507
3
        ss->id = operator_id();
508
3
        for (auto& dest : dests_id()) {
509
3
            ss->related_op_ids.insert(dest);
510
3
        }
511
3
        return ss;
512
3
    }
513
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
483
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
483
    } else {
506
483
        auto ss = LocalStateType::SharedStateType::create_shared();
507
483
        ss->id = operator_id();
508
483
        for (auto& dest : dests_id()) {
509
482
            ss->related_op_ids.insert(dest);
510
482
        }
511
483
        return ss;
512
483
    }
513
483
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
65.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
65.1k
    } else {
506
65.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
65.1k
        ss->id = operator_id();
508
65.1k
        for (auto& dest : dests_id()) {
509
64.9k
            ss->related_op_ids.insert(dest);
510
64.9k
        }
511
65.1k
        return ss;
512
65.1k
    }
513
65.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
498
5.20k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
5.20k
    } else {
506
5.20k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
5.20k
        ss->id = operator_id();
508
5.20k
        for (auto& dest : dests_id()) {
509
5.20k
            ss->related_op_ids.insert(dest);
510
5.20k
        }
511
5.20k
        return ss;
512
5.20k
    }
513
5.20k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
5.22k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
5.22k
    } else {
506
5.22k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
5.22k
        ss->id = operator_id();
508
5.22k
        for (auto& dest : dests_id()) {
509
5.22k
            ss->related_op_ids.insert(dest);
510
5.22k
        }
511
5.22k
        return ss;
512
5.22k
    }
513
5.22k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
156
    } else {
506
156
        auto ss = LocalStateType::SharedStateType::create_shared();
507
156
        ss->id = operator_id();
508
156
        for (auto& dest : dests_id()) {
509
156
            ss->related_op_ids.insert(dest);
510
156
        }
511
156
        return ss;
512
156
    }
513
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
3.23k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
3.23k
    } else {
506
3.23k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
3.23k
        ss->id = operator_id();
508
3.23k
        for (auto& dest : dests_id()) {
509
3.23k
            ss->related_op_ids.insert(dest);
510
3.23k
        }
511
3.23k
        return ss;
512
3.23k
    }
513
3.23k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
8.17k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
8.17k
    } else {
506
8.17k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
8.17k
        ss->id = operator_id();
508
8.17k
        for (auto& dest : dests_id()) {
509
8.16k
            ss->related_op_ids.insert(dest);
510
8.16k
        }
511
8.17k
        return ss;
512
8.17k
    }
513
8.17k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
89
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
89
    } else {
506
89
        auto ss = LocalStateType::SharedStateType::create_shared();
507
89
        ss->id = operator_id();
508
89
        for (auto& dest : dests_id()) {
509
89
            ss->related_op_ids.insert(dest);
510
89
        }
511
89
        return ss;
512
89
    }
513
89
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
270k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
270k
    } else {
506
270k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
270k
        ss->id = operator_id();
508
270k
        for (auto& dest : dests_id()) {
509
270k
            ss->related_op_ids.insert(dest);
510
270k
        }
511
270k
        return ss;
512
270k
    }
513
270k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
32
    } else {
506
32
        auto ss = LocalStateType::SharedStateType::create_shared();
507
32
        ss->id = operator_id();
508
32
        for (auto& dest : dests_id()) {
509
32
            ss->related_op_ids.insert(dest);
510
32
        }
511
32
        return ss;
512
32
    }
513
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
170k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
170k
    } else {
506
170k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
170k
        ss->id = operator_id();
508
170k
        for (auto& dest : dests_id()) {
509
170k
            ss->related_op_ids.insert(dest);
510
170k
        }
511
170k
        return ss;
512
170k
    }
513
170k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
1.35k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
1.35k
    } else {
506
1.35k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
1.35k
        ss->id = operator_id();
508
1.35k
        for (auto& dest : dests_id()) {
509
1.35k
            ss->related_op_ids.insert(dest);
510
1.35k
        }
511
1.35k
        return ss;
512
1.35k
    }
513
1.35k
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
733k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
733k
    } else {
506
733k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
733k
        ss->id = operator_id();
508
733k
        for (auto& dest : dests_id()) {
509
731k
            ss->related_op_ids.insert(dest);
510
731k
        }
511
733k
        return ss;
512
733k
    }
513
733k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
10.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
10.4k
    } else {
506
10.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
10.4k
        ss->id = operator_id();
508
10.4k
        for (auto& dest : dests_id()) {
509
10.4k
            ss->related_op_ids.insert(dest);
510
10.4k
        }
511
10.4k
        return ss;
512
10.4k
    }
513
10.4k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
568
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
568
    } else {
506
568
        auto ss = LocalStateType::SharedStateType::create_shared();
507
568
        ss->id = operator_id();
508
568
        for (auto& dest : dests_id()) {
509
568
            ss->related_op_ids.insert(dest);
510
568
        }
511
568
        return ss;
512
568
    }
513
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
498
2.69k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
2.69k
    } else {
506
2.69k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
2.69k
        ss->id = operator_id();
508
2.69k
        for (auto& dest : dests_id()) {
509
2.68k
            ss->related_op_ids.insert(dest);
510
2.68k
        }
511
2.69k
        return ss;
512
2.69k
    }
513
2.69k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
498
2.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
2.49k
    } else {
506
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
2.49k
        ss->id = operator_id();
508
2.49k
        for (auto& dest : dests_id()) {
509
2.48k
            ss->related_op_ids.insert(dest);
510
2.48k
        }
511
2.49k
        return ss;
512
2.49k
    }
513
2.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
165
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
165
    } else {
506
165
        auto ss = LocalStateType::SharedStateType::create_shared();
507
165
        ss->id = operator_id();
508
165
        for (auto& dest : dests_id()) {
509
165
            ss->related_op_ids.insert(dest);
510
165
        }
511
165
        return ss;
512
165
    }
513
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
104
    } else {
506
104
        auto ss = LocalStateType::SharedStateType::create_shared();
507
104
        ss->id = operator_id();
508
104
        for (auto& dest : dests_id()) {
509
104
            ss->related_op_ids.insert(dest);
510
104
        }
511
104
        return ss;
512
104
    }
513
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
514
515
template <typename LocalStateType>
516
2.87M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
2.87M
    auto local_state = LocalStateType::create_unique(state, this);
518
2.87M
    RETURN_IF_ERROR(local_state->init(state, info));
519
2.87M
    state->emplace_local_state(operator_id(), std::move(local_state));
520
2.87M
    return Status::OK();
521
2.87M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
145k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
145k
    auto local_state = LocalStateType::create_unique(state, this);
518
145k
    RETURN_IF_ERROR(local_state->init(state, info));
519
145k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
145k
    return Status::OK();
521
145k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
375k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
375k
    auto local_state = LocalStateType::create_unique(state, this);
518
375k
    RETURN_IF_ERROR(local_state->init(state, info));
519
375k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
375k
    return Status::OK();
521
375k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
79
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
79
    auto local_state = LocalStateType::create_unique(state, this);
518
79
    RETURN_IF_ERROR(local_state->init(state, info));
519
79
    state->emplace_local_state(operator_id(), std::move(local_state));
520
79
    return Status::OK();
521
79
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
34.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
34.2k
    auto local_state = LocalStateType::create_unique(state, this);
518
34.2k
    RETURN_IF_ERROR(local_state->init(state, info));
519
34.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
34.2k
    return Status::OK();
521
34.2k
}
_ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
676
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
676
    auto local_state = LocalStateType::create_unique(state, this);
518
676
    RETURN_IF_ERROR(local_state->init(state, info));
519
676
    state->emplace_local_state(operator_id(), std::move(local_state));
520
676
    return Status::OK();
521
676
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
8.15k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
8.15k
    auto local_state = LocalStateType::create_unique(state, this);
518
8.15k
    RETURN_IF_ERROR(local_state->init(state, info));
519
8.15k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
8.15k
    return Status::OK();
521
8.15k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
11.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
11.7k
    auto local_state = LocalStateType::create_unique(state, this);
518
11.7k
    RETURN_IF_ERROR(local_state->init(state, info));
519
11.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
11.7k
    return Status::OK();
521
11.7k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
24
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
24
    auto local_state = LocalStateType::create_unique(state, this);
518
24
    RETURN_IF_ERROR(local_state->init(state, info));
519
24
    state->emplace_local_state(operator_id(), std::move(local_state));
520
24
    return Status::OK();
521
24
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
258k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
258k
    auto local_state = LocalStateType::create_unique(state, this);
518
258k
    RETURN_IF_ERROR(local_state->init(state, info));
519
258k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
258k
    return Status::OK();
521
258k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
170k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
170k
    auto local_state = LocalStateType::create_unique(state, this);
518
170k
    RETURN_IF_ERROR(local_state->init(state, info));
519
170k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
170k
    return Status::OK();
521
170k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
1.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
1.34k
    auto local_state = LocalStateType::create_unique(state, this);
518
1.34k
    RETURN_IF_ERROR(local_state->init(state, info));
519
1.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
1.34k
    return Status::OK();
521
1.34k
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
3.92k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
3.92k
    auto local_state = LocalStateType::create_unique(state, this);
518
3.92k
    RETURN_IF_ERROR(local_state->init(state, info));
519
3.92k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
3.92k
    return Status::OK();
521
3.92k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
485k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
485k
    auto local_state = LocalStateType::create_unique(state, this);
518
485k
    RETURN_IF_ERROR(local_state->init(state, info));
519
485k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
485k
    return Status::OK();
521
485k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
1.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
518
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
519
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
1.56k
    return Status::OK();
521
1.56k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
10.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
10.4k
    auto local_state = LocalStateType::create_unique(state, this);
518
10.4k
    RETURN_IF_ERROR(local_state->init(state, info));
519
10.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
10.4k
    return Status::OK();
521
10.4k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
233
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
233
    auto local_state = LocalStateType::create_unique(state, this);
518
233
    RETURN_IF_ERROR(local_state->init(state, info));
519
233
    state->emplace_local_state(operator_id(), std::move(local_state));
520
233
    return Status::OK();
521
233
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
1.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
1.67k
    auto local_state = LocalStateType::create_unique(state, this);
518
1.67k
    RETURN_IF_ERROR(local_state->init(state, info));
519
1.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
1.67k
    return Status::OK();
521
1.67k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
55.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
55.8k
    auto local_state = LocalStateType::create_unique(state, this);
518
55.8k
    RETURN_IF_ERROR(local_state->init(state, info));
519
55.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
55.8k
    return Status::OK();
521
55.8k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
13.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
13.8k
    auto local_state = LocalStateType::create_unique(state, this);
518
13.8k
    RETURN_IF_ERROR(local_state->init(state, info));
519
13.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
13.8k
    return Status::OK();
521
13.8k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
466
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
466
    auto local_state = LocalStateType::create_unique(state, this);
518
466
    RETURN_IF_ERROR(local_state->init(state, info));
519
466
    state->emplace_local_state(operator_id(), std::move(local_state));
520
466
    return Status::OK();
521
466
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
2.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
2.69k
    auto local_state = LocalStateType::create_unique(state, this);
518
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
519
2.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
2.69k
    return Status::OK();
521
2.69k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
2.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
2.49k
    auto local_state = LocalStateType::create_unique(state, this);
518
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
519
2.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
2.49k
    return Status::OK();
521
2.49k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
461
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
461
    auto local_state = LocalStateType::create_unique(state, this);
518
461
    RETURN_IF_ERROR(local_state->init(state, info));
519
461
    state->emplace_local_state(operator_id(), std::move(local_state));
520
461
    return Status::OK();
521
461
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
2.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
2.33k
    auto local_state = LocalStateType::create_unique(state, this);
518
2.33k
    RETURN_IF_ERROR(local_state->init(state, info));
519
2.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
2.33k
    return Status::OK();
521
2.33k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
7.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
7.35k
    auto local_state = LocalStateType::create_unique(state, this);
518
7.35k
    RETURN_IF_ERROR(local_state->init(state, info));
519
7.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
7.35k
    return Status::OK();
521
7.35k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
767k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
767k
    auto local_state = LocalStateType::create_unique(state, this);
518
767k
    RETURN_IF_ERROR(local_state->init(state, info));
519
767k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
767k
    return Status::OK();
521
767k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
108
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
108
    auto local_state = LocalStateType::create_unique(state, this);
518
108
    RETURN_IF_ERROR(local_state->init(state, info));
519
108
    state->emplace_local_state(operator_id(), std::move(local_state));
520
108
    return Status::OK();
521
108
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
150
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
150
    auto local_state = LocalStateType::create_unique(state, this);
518
150
    RETURN_IF_ERROR(local_state->init(state, info));
519
150
    state->emplace_local_state(operator_id(), std::move(local_state));
520
150
    return Status::OK();
521
150
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
1.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
1.85k
    auto local_state = LocalStateType::create_unique(state, this);
518
1.85k
    RETURN_IF_ERROR(local_state->init(state, info));
519
1.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
1.85k
    return Status::OK();
521
1.85k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
1.90k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
1.90k
    auto local_state = LocalStateType::create_unique(state, this);
518
1.90k
    RETURN_IF_ERROR(local_state->init(state, info));
519
1.90k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
1.90k
    return Status::OK();
521
1.90k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
3.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
3.02k
    auto local_state = LocalStateType::create_unique(state, this);
518
3.02k
    RETURN_IF_ERROR(local_state->init(state, info));
519
3.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
3.02k
    return Status::OK();
521
3.02k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
16.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
16.0k
    auto local_state = LocalStateType::create_unique(state, this);
518
16.0k
    RETURN_IF_ERROR(local_state->init(state, info));
519
16.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
16.0k
    return Status::OK();
521
16.0k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
486k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
486k
    auto local_state = LocalStateType::create_unique(state, this);
518
486k
    RETURN_IF_ERROR(local_state->init(state, info));
519
486k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
486k
    return Status::OK();
521
486k
}
522
523
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
524
                                                         RuntimeState* state)
525
2.27M
        : _parent(parent), _state(state) {}
526
527
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
528
2.87M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
529
530
template <typename SharedStateArg>
531
2.87M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
2.87M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
2.87M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
2.87M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
2.87M
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
2.87M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
2.87M
    _operator_profile->add_child(_common_profile.get(), true);
540
2.87M
    _operator_profile->add_child(_custom_profile.get(), true);
541
2.87M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
2.87M
    if constexpr (!is_fake_shared) {
543
1.44M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
787k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
787k
                                    .first.get()
546
787k
                                    ->template cast<SharedStateArg>();
547
548
787k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
787k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
787k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
787k
        } else if (info.shared_state) {
552
605k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
605k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
605k
            _dependency = _shared_state->create_source_dependency(
559
605k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
605k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
605k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
605k
        } else {
563
56.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
208
                DCHECK(false);
565
208
            }
566
56.6k
        }
567
1.44M
    }
568
569
2.87M
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
2.87M
    _rows_returned_counter =
574
2.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
2.87M
    _blocks_returned_counter =
576
2.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
2.87M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
2.87M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
2.87M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
2.87M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
2.87M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
2.87M
    _memory_used_counter =
583
2.87M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
2.87M
    _common_profile->add_info_string("IsColocate",
585
2.87M
                                     std::to_string(_parent->is_colocated_operator()));
586
2.87M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
2.87M
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
2.87M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
2.87M
    return Status::OK();
590
2.87M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
145k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
145k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
145k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
145k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
145k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
145k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
145k
    _operator_profile->add_child(_common_profile.get(), true);
540
145k
    _operator_profile->add_child(_custom_profile.get(), true);
541
145k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
145k
    if constexpr (!is_fake_shared) {
543
145k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
20.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
20.2k
                                    .first.get()
546
20.2k
                                    ->template cast<SharedStateArg>();
547
548
20.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
20.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
20.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
125k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
124k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
124k
            _dependency = _shared_state->create_source_dependency(
559
124k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
124k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
124k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
124k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
873
        }
567
145k
    }
568
569
145k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
145k
    _rows_returned_counter =
574
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
145k
    _blocks_returned_counter =
576
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
145k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
145k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
145k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
145k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
145k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
145k
    _memory_used_counter =
583
145k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
145k
    _common_profile->add_info_string("IsColocate",
585
145k
                                     std::to_string(_parent->is_colocated_operator()));
586
145k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
145k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
145k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
145k
    return Status::OK();
590
145k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1
    _operator_profile->add_child(_common_profile.get(), true);
540
1
    _operator_profile->add_child(_custom_profile.get(), true);
541
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
1
    if constexpr (!is_fake_shared) {
543
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
1
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
1
            _dependency = _shared_state->create_source_dependency(
559
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
1
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
1
    }
568
569
1
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1
    _rows_returned_counter =
574
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1
    _blocks_returned_counter =
576
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
1
    _memory_used_counter =
583
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
1
    _common_profile->add_info_string("IsColocate",
585
1
                                     std::to_string(_parent->is_colocated_operator()));
586
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
1
    return Status::OK();
590
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
270k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
270k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
270k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
270k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
270k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
270k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
270k
    _operator_profile->add_child(_common_profile.get(), true);
540
270k
    _operator_profile->add_child(_custom_profile.get(), true);
541
270k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
270k
    if constexpr (!is_fake_shared) {
543
270k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
270k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
266k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
266k
            _dependency = _shared_state->create_source_dependency(
559
266k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
266k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
266k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
266k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
3.37k
        }
567
270k
    }
568
569
270k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
270k
    _rows_returned_counter =
574
270k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
270k
    _blocks_returned_counter =
576
270k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
270k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
270k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
270k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
270k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
270k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
270k
    _memory_used_counter =
583
270k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
270k
    _common_profile->add_info_string("IsColocate",
585
270k
                                     std::to_string(_parent->is_colocated_operator()));
586
270k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
270k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
270k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
270k
    return Status::OK();
590
270k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
24
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
24
    _operator_profile->add_child(_common_profile.get(), true);
540
24
    _operator_profile->add_child(_custom_profile.get(), true);
541
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
24
    if constexpr (!is_fake_shared) {
543
24
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
24
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
24
            _dependency = _shared_state->create_source_dependency(
559
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
24
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
24
    }
568
569
24
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
24
    _rows_returned_counter =
574
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
24
    _blocks_returned_counter =
576
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
24
    _memory_used_counter =
583
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
24
    _common_profile->add_info_string("IsColocate",
585
24
                                     std::to_string(_parent->is_colocated_operator()));
586
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
24
    return Status::OK();
590
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
10.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
10.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
10.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
10.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
10.4k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
10.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
10.4k
    _operator_profile->add_child(_common_profile.get(), true);
540
10.4k
    _operator_profile->add_child(_custom_profile.get(), true);
541
10.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
10.4k
    if constexpr (!is_fake_shared) {
543
10.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
10.4k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
10.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
10.4k
            _dependency = _shared_state->create_source_dependency(
559
10.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
10.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
10.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
10.4k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
20
        }
567
10.4k
    }
568
569
10.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
10.4k
    _rows_returned_counter =
574
10.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
10.4k
    _blocks_returned_counter =
576
10.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
10.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
10.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
10.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
10.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
10.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
10.4k
    _memory_used_counter =
583
10.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
10.4k
    _common_profile->add_info_string("IsColocate",
585
10.4k
                                     std::to_string(_parent->is_colocated_operator()));
586
10.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
10.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
10.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
10.4k
    return Status::OK();
590
10.4k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
8.16k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
8.16k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
8.16k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
8.16k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
8.16k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
8.16k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
8.16k
    _operator_profile->add_child(_common_profile.get(), true);
540
8.16k
    _operator_profile->add_child(_custom_profile.get(), true);
541
8.16k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
8.16k
    if constexpr (!is_fake_shared) {
543
8.16k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
8.16k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
8.15k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
8.15k
            _dependency = _shared_state->create_source_dependency(
559
8.15k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
8.15k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
8.15k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
8.15k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
11
        }
567
8.16k
    }
568
569
8.16k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
8.16k
    _rows_returned_counter =
574
8.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
8.16k
    _blocks_returned_counter =
576
8.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
8.16k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
8.16k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
8.16k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
8.16k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
8.16k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
8.16k
    _memory_used_counter =
583
8.16k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
8.16k
    _common_profile->add_info_string("IsColocate",
585
8.16k
                                     std::to_string(_parent->is_colocated_operator()));
586
8.16k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
8.16k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
8.16k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
8.16k
    return Status::OK();
590
8.16k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
170k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
170k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
170k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
170k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
170k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
170k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
170k
    _operator_profile->add_child(_common_profile.get(), true);
540
170k
    _operator_profile->add_child(_custom_profile.get(), true);
541
170k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
170k
    if constexpr (!is_fake_shared) {
543
170k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
170k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
169k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
169k
            _dependency = _shared_state->create_source_dependency(
559
169k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
169k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
169k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
169k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
771
        }
567
170k
    }
568
569
170k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
170k
    _rows_returned_counter =
574
170k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
170k
    _blocks_returned_counter =
576
170k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
170k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
170k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
170k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
170k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
170k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
170k
    _memory_used_counter =
583
170k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
170k
    _common_profile->add_info_string("IsColocate",
585
170k
                                     std::to_string(_parent->is_colocated_operator()));
586
170k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
170k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
170k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
170k
    return Status::OK();
590
170k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1.34k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1.34k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1.34k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1.34k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1.34k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1.34k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1.34k
    _operator_profile->add_child(_common_profile.get(), true);
540
1.34k
    _operator_profile->add_child(_custom_profile.get(), true);
541
1.34k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
1.34k
    if constexpr (!is_fake_shared) {
543
1.34k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
1.34k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
1.34k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
1.34k
            _dependency = _shared_state->create_source_dependency(
559
1.34k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
1.34k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
1.34k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
1.34k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
1.34k
    }
568
569
1.34k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1.34k
    _rows_returned_counter =
574
1.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1.34k
    _blocks_returned_counter =
576
1.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1.34k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
1.34k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
1.34k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
1.34k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
1.34k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
1.34k
    _memory_used_counter =
583
1.34k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
1.34k
    _common_profile->add_info_string("IsColocate",
585
1.34k
                                     std::to_string(_parent->is_colocated_operator()));
586
1.34k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
1.34k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
1.34k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
1.34k
    return Status::OK();
590
1.34k
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1.42M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1.42M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1.42M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1.42M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1.42M
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1.42M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1.42M
    _operator_profile->add_child(_common_profile.get(), true);
540
1.42M
    _operator_profile->add_child(_custom_profile.get(), true);
541
1.42M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
    if constexpr (!is_fake_shared) {
543
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
                                    .first.get()
546
                                    ->template cast<SharedStateArg>();
547
548
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
            _dependency = _shared_state->create_source_dependency(
559
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
        }
567
    }
568
569
1.42M
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1.42M
    _rows_returned_counter =
574
1.42M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1.42M
    _blocks_returned_counter =
576
1.42M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1.42M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
1.42M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
1.42M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
1.42M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
1.42M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
1.42M
    _memory_used_counter =
583
1.42M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
1.42M
    _common_profile->add_info_string("IsColocate",
585
1.42M
                                     std::to_string(_parent->is_colocated_operator()));
586
1.42M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
1.42M
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
1.42M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
1.42M
    return Status::OK();
590
1.42M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
55.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
55.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
55.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
55.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
55.7k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
55.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
55.7k
    _operator_profile->add_child(_common_profile.get(), true);
540
55.7k
    _operator_profile->add_child(_custom_profile.get(), true);
541
55.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
55.7k
    if constexpr (!is_fake_shared) {
543
55.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
55.7k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
4.37k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
4.37k
            _dependency = _shared_state->create_source_dependency(
559
4.37k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
4.37k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
4.37k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
51.4k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
51.4k
        }
567
55.7k
    }
568
569
55.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
55.7k
    _rows_returned_counter =
574
55.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
55.7k
    _blocks_returned_counter =
576
55.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
55.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
55.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
55.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
55.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
55.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
55.7k
    _memory_used_counter =
583
55.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
55.7k
    _common_profile->add_info_string("IsColocate",
585
55.7k
                                     std::to_string(_parent->is_colocated_operator()));
586
55.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
55.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
55.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
55.7k
    return Status::OK();
590
55.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
110
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
110
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
110
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
110
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
110
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
110
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
110
    _operator_profile->add_child(_common_profile.get(), true);
540
110
    _operator_profile->add_child(_custom_profile.get(), true);
541
110
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
110
    if constexpr (!is_fake_shared) {
543
110
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
111
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
111
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
111
            _dependency = _shared_state->create_source_dependency(
559
111
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
111
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
111
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
18.4E
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
18.4E
        }
567
110
    }
568
569
111
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
110
    _rows_returned_counter =
574
110
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
110
    _blocks_returned_counter =
576
110
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
110
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
110
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
110
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
110
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
110
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
110
    _memory_used_counter =
583
110
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
110
    _common_profile->add_info_string("IsColocate",
585
110
                                     std::to_string(_parent->is_colocated_operator()));
586
110
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
110
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
110
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
110
    return Status::OK();
590
110
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
13.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
13.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
13.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
13.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
13.8k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
13.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
13.8k
    _operator_profile->add_child(_common_profile.get(), true);
540
13.8k
    _operator_profile->add_child(_custom_profile.get(), true);
541
13.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
13.8k
    if constexpr (!is_fake_shared) {
543
13.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
13.8k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
13.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
13.8k
            _dependency = _shared_state->create_source_dependency(
559
13.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
13.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
13.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
13.8k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
20
        }
567
13.8k
    }
568
569
13.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
13.8k
    _rows_returned_counter =
574
13.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
13.8k
    _blocks_returned_counter =
576
13.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
13.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
13.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
13.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
13.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
13.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
13.8k
    _memory_used_counter =
583
13.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
13.8k
    _common_profile->add_info_string("IsColocate",
585
13.8k
                                     std::to_string(_parent->is_colocated_operator()));
586
13.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
13.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
13.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
13.8k
    return Status::OK();
590
13.8k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
568
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
568
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
568
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
568
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
568
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
568
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
568
    _operator_profile->add_child(_common_profile.get(), true);
540
568
    _operator_profile->add_child(_custom_profile.get(), true);
541
568
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
568
    if constexpr (!is_fake_shared) {
543
568
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
568
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
568
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
568
            _dependency = _shared_state->create_source_dependency(
559
568
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
568
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
568
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
568
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
568
    }
568
569
568
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
568
    _rows_returned_counter =
574
568
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
568
    _blocks_returned_counter =
576
568
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
568
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
568
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
568
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
568
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
568
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
568
    _memory_used_counter =
583
568
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
568
    _common_profile->add_info_string("IsColocate",
585
568
                                     std::to_string(_parent->is_colocated_operator()));
586
568
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
568
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
568
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
568
    return Status::OK();
590
568
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
5.20k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
5.20k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
5.20k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
5.20k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
5.20k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
5.20k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
5.20k
    _operator_profile->add_child(_common_profile.get(), true);
540
5.20k
    _operator_profile->add_child(_custom_profile.get(), true);
541
5.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
5.20k
    if constexpr (!is_fake_shared) {
543
5.20k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
5.20k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
5.18k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
5.18k
            _dependency = _shared_state->create_source_dependency(
559
5.18k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
5.18k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
5.18k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
5.18k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
23
        }
567
5.20k
    }
568
569
5.20k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
5.20k
    _rows_returned_counter =
574
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
5.20k
    _blocks_returned_counter =
576
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
5.20k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
5.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
5.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
5.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
5.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
5.20k
    _memory_used_counter =
583
5.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
5.20k
    _common_profile->add_info_string("IsColocate",
585
5.20k
                                     std::to_string(_parent->is_colocated_operator()));
586
5.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
5.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
5.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
5.20k
    return Status::OK();
590
5.20k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
767k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
767k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
767k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
767k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
767k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
767k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
767k
    _operator_profile->add_child(_common_profile.get(), true);
540
767k
    _operator_profile->add_child(_custom_profile.get(), true);
541
767k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
767k
    if constexpr (!is_fake_shared) {
543
767k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
766k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
766k
                                    .first.get()
546
766k
                                    ->template cast<SharedStateArg>();
547
548
766k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
766k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
766k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
766k
        } else if (info.shared_state) {
552
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->create_source_dependency(
559
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
208
        } else {
563
208
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
208
                DCHECK(false);
565
208
            }
566
208
        }
567
767k
    }
568
569
767k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
767k
    _rows_returned_counter =
574
767k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
767k
    _blocks_returned_counter =
576
767k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
767k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
767k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
767k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
767k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
767k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
767k
    _memory_used_counter =
583
767k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
767k
    _common_profile->add_info_string("IsColocate",
585
767k
                                     std::to_string(_parent->is_colocated_operator()));
586
767k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
767k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
767k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
767k
    return Status::OK();
590
767k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
150
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
150
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
150
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
150
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
150
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
150
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
150
    _operator_profile->add_child(_common_profile.get(), true);
540
150
    _operator_profile->add_child(_custom_profile.get(), true);
541
150
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
150
    if constexpr (!is_fake_shared) {
543
150
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
150
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
149
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
149
            _dependency = _shared_state->create_source_dependency(
559
149
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
149
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
149
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
149
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
1
        }
567
150
    }
568
569
150
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
150
    _rows_returned_counter =
574
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
150
    _blocks_returned_counter =
576
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
150
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
150
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
150
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
150
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
150
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
150
    _memory_used_counter =
583
150
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
150
    _common_profile->add_info_string("IsColocate",
585
150
                                     std::to_string(_parent->is_colocated_operator()));
586
150
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
150
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
150
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
150
    return Status::OK();
590
150
}
591
592
template <typename SharedStateArg>
593
2.88M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
2.88M
    _conjuncts.resize(_parent->_conjuncts.size());
595
2.88M
    _projections.resize(_parent->_projections.size());
596
3.41M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
530k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
530k
    }
599
6.32M
    for (size_t i = 0; i < _projections.size(); i++) {
600
3.44M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
3.44M
    }
602
2.88M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
2.88M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
6.00k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
41.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
35.5k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
35.5k
                    state, _intermediate_projections[i][j]));
608
35.5k
        }
609
6.00k
    }
610
2.88M
    return Status::OK();
611
2.88M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
145k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
145k
    _conjuncts.resize(_parent->_conjuncts.size());
595
145k
    _projections.resize(_parent->_projections.size());
596
147k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
1.35k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
1.35k
    }
599
740k
    for (size_t i = 0; i < _projections.size(); i++) {
600
594k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
594k
    }
602
145k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
146k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
855
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
8.82k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
7.96k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
7.96k
                    state, _intermediate_projections[i][j]));
608
7.96k
        }
609
855
    }
610
145k
    return Status::OK();
611
145k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
3
    _conjuncts.resize(_parent->_conjuncts.size());
595
3
    _projections.resize(_parent->_projections.size());
596
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
3
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
3
    return Status::OK();
611
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
270k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
270k
    _conjuncts.resize(_parent->_conjuncts.size());
595
270k
    _projections.resize(_parent->_projections.size());
596
270k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
294k
    for (size_t i = 0; i < _projections.size(); i++) {
600
23.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
23.4k
    }
602
270k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
270k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
270k
    return Status::OK();
611
270k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
24
    _conjuncts.resize(_parent->_conjuncts.size());
595
24
    _projections.resize(_parent->_projections.size());
596
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
24
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
24
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
24
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
24
    return Status::OK();
611
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
10.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
10.4k
    _conjuncts.resize(_parent->_conjuncts.size());
595
10.4k
    _projections.resize(_parent->_projections.size());
596
10.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
111
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
111
    }
599
68.0k
    for (size_t i = 0; i < _projections.size(); i++) {
600
57.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
57.5k
    }
602
10.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
10.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
5
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
48
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
43
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
43
                    state, _intermediate_projections[i][j]));
608
43
        }
609
5
    }
610
10.4k
    return Status::OK();
611
10.4k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
8.17k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
8.17k
    _conjuncts.resize(_parent->_conjuncts.size());
595
8.17k
    _projections.resize(_parent->_projections.size());
596
8.94k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
771
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
771
    }
599
21.2k
    for (size_t i = 0; i < _projections.size(); i++) {
600
13.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
13.0k
    }
602
8.17k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
8.36k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
192
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
1.47k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
1.27k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
1.27k
                    state, _intermediate_projections[i][j]));
608
1.27k
        }
609
192
    }
610
8.17k
    return Status::OK();
611
8.17k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
170k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
170k
    _conjuncts.resize(_parent->_conjuncts.size());
595
170k
    _projections.resize(_parent->_projections.size());
596
175k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
4.74k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
4.74k
    }
599
549k
    for (size_t i = 0; i < _projections.size(); i++) {
600
378k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
378k
    }
602
170k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
171k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
350
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
2.41k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
2.06k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
2.06k
                    state, _intermediate_projections[i][j]));
608
2.06k
        }
609
350
    }
610
170k
    return Status::OK();
611
170k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
1.35k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
1.35k
    _conjuncts.resize(_parent->_conjuncts.size());
595
1.35k
    _projections.resize(_parent->_projections.size());
596
1.35k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
3.19k
    for (size_t i = 0; i < _projections.size(); i++) {
600
1.84k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
1.84k
    }
602
1.35k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
1.35k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
1.35k
    return Status::OK();
611
1.35k
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
1.42M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
1.42M
    _conjuncts.resize(_parent->_conjuncts.size());
595
1.42M
    _projections.resize(_parent->_projections.size());
596
1.94M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
519k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
519k
    }
599
3.69M
    for (size_t i = 0; i < _projections.size(); i++) {
600
2.27M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
2.27M
    }
602
1.42M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
1.43M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
4.59k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
28.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
24.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
24.1k
                    state, _intermediate_projections[i][j]));
608
24.1k
        }
609
4.59k
    }
610
1.42M
    return Status::OK();
611
1.42M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
55.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
55.9k
    _conjuncts.resize(_parent->_conjuncts.size());
595
55.9k
    _projections.resize(_parent->_projections.size());
596
55.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
161k
    for (size_t i = 0; i < _projections.size(); i++) {
600
105k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
105k
    }
602
55.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
55.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
55.9k
    return Status::OK();
611
55.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
111
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
111
    _conjuncts.resize(_parent->_conjuncts.size());
595
111
    _projections.resize(_parent->_projections.size());
596
111
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
111
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
111
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
111
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
111
    return Status::OK();
611
111
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
13.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
13.8k
    _conjuncts.resize(_parent->_conjuncts.size());
595
13.8k
    _projections.resize(_parent->_projections.size());
596
18.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
4.58k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
4.58k
    }
599
13.8k
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
13.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
13.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
13.8k
    return Status::OK();
611
13.8k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
568
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
568
    _conjuncts.resize(_parent->_conjuncts.size());
595
568
    _projections.resize(_parent->_projections.size());
596
568
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
568
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
568
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
568
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
568
    return Status::OK();
611
568
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
5.20k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
5.20k
    _conjuncts.resize(_parent->_conjuncts.size());
595
5.20k
    _projections.resize(_parent->_projections.size());
596
5.20k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
5.26k
    for (size_t i = 0; i < _projections.size(); i++) {
600
62
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
62
    }
602
5.20k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
5.20k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
5.20k
    return Status::OK();
611
5.20k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
770k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
770k
    _conjuncts.resize(_parent->_conjuncts.size());
595
770k
    _projections.resize(_parent->_projections.size());
596
770k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
770k
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
770k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
770k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
770k
    return Status::OK();
611
770k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
150
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
150
    _conjuncts.resize(_parent->_conjuncts.size());
595
150
    _projections.resize(_parent->_projections.size());
596
157
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
7
    }
599
443
    for (size_t i = 0; i < _projections.size(); i++) {
600
293
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
293
    }
602
150
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
151
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
2
                    state, _intermediate_projections[i][j]));
608
2
        }
609
1
    }
610
150
    return Status::OK();
611
150
}
612
613
template <typename SharedStateArg>
614
11.1k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
11.1k
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
11.1k
    _terminated = true;
619
11.1k
    return Status::OK();
620
11.1k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
1.58k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
1.58k
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
1.58k
    _terminated = true;
619
1.58k
    return Status::OK();
620
1.58k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
233
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
233
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
233
    _terminated = true;
619
233
    return Status::OK();
620
233
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
223
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
223
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
223
    _terminated = true;
619
223
    return Status::OK();
620
223
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
956
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
956
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
956
    _terminated = true;
619
956
    return Status::OK();
620
956
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
2
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
2
    _terminated = true;
619
2
    return Status::OK();
620
2
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
6.77k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
6.77k
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
6.77k
    _terminated = true;
619
6.77k
    return Status::OK();
620
6.77k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
11
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
11
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
11
    _terminated = true;
619
11
    return Status::OK();
620
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
47
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
47
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
47
    _terminated = true;
619
47
    return Status::OK();
620
47
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
5
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
5
    _terminated = true;
619
5
    return Status::OK();
620
5
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
1.32k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
1.32k
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
1.32k
    _terminated = true;
619
1.32k
    return Status::OK();
620
1.32k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
614
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
19
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
19
    _terminated = true;
619
19
    return Status::OK();
620
19
}
621
622
template <typename SharedStateArg>
623
3.18M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
3.18M
    if (_closed) {
625
304k
        return Status::OK();
626
304k
    }
627
2.88M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
1.45M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
1.45M
    }
630
2.88M
    _closed = true;
631
2.88M
    return Status::OK();
632
3.18M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
145k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
145k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
145k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
145k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
145k
    }
630
145k
    _closed = true;
631
145k
    return Status::OK();
632
145k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
3
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
3
    }
630
3
    _closed = true;
631
3
    return Status::OK();
632
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
539k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
539k
    if (_closed) {
625
269k
        return Status::OK();
626
269k
    }
627
269k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
269k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
269k
    }
630
269k
    _closed = true;
631
269k
    return Status::OK();
632
539k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
24
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
24
    }
630
24
    _closed = true;
631
24
    return Status::OK();
632
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
10.4k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
10.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
10.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
10.4k
    }
630
10.4k
    _closed = true;
631
10.4k
    return Status::OK();
632
10.4k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
16.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
16.4k
    if (_closed) {
625
8.25k
        return Status::OK();
626
8.25k
    }
627
8.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
8.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
8.16k
    }
630
8.16k
    _closed = true;
631
8.16k
    return Status::OK();
632
16.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
169k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
169k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
169k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
169k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
169k
    }
630
169k
    _closed = true;
631
169k
    return Status::OK();
632
169k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
1.34k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
1.34k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
1.34k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
1.34k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
1.34k
    }
630
1.34k
    _closed = true;
631
1.34k
    return Status::OK();
632
1.34k
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
1.44M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
1.44M
    if (_closed) {
625
20.0k
        return Status::OK();
626
20.0k
    }
627
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
    }
630
1.42M
    _closed = true;
631
1.42M
    return Status::OK();
632
1.44M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
55.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
55.9k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
55.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
55.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
55.9k
    }
630
55.9k
    _closed = true;
631
55.9k
    return Status::OK();
632
55.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
216
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
216
    if (_closed) {
625
108
        return Status::OK();
626
108
    }
627
108
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
108
    }
630
108
    _closed = true;
631
108
    return Status::OK();
632
216
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
13.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
13.8k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
13.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
13.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
13.8k
    }
630
13.8k
    _closed = true;
631
13.8k
    return Status::OK();
632
13.8k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
929
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
929
    if (_closed) {
625
465
        return Status::OK();
626
465
    }
627
464
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
464
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
464
    }
630
464
    _closed = true;
631
464
    return Status::OK();
632
929
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
10.4k
    if (_closed) {
625
5.23k
        return Status::OK();
626
5.23k
    }
627
5.19k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
5.19k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
5.19k
    }
630
5.19k
    _closed = true;
631
5.19k
    return Status::OK();
632
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
772k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
772k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
772k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
772k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
772k
    }
630
772k
    _closed = true;
631
772k
    return Status::OK();
632
772k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
350
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
350
    if (_closed) {
625
201
        return Status::OK();
626
201
    }
627
149
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
149
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
149
    }
630
149
    _closed = true;
631
149
    return Status::OK();
632
350
}
633
634
template <typename SharedState>
635
2.27M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
2.27M
    _operator_profile =
638
2.27M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
2.27M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
2.27M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
2.27M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
2.27M
    _operator_profile->add_child(_common_profile, true);
647
2.27M
    _operator_profile->add_child(_custom_profile, true);
648
649
2.27M
    _operator_profile->set_metadata(_parent->node_id());
650
2.27M
    _wait_for_finish_dependency_timer =
651
2.27M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
2.27M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
2.27M
    if constexpr (!is_fake_shared) {
654
1.54M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
1.54M
            info.shared_state_map.end()) {
656
353k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
331k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
331k
            }
659
353k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
353k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
353k
                                                  ? 0
662
353k
                                                  : info.task_idx]
663
353k
                                  .get();
664
353k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
1.18M
        } else {
666
1.18M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
391
                DCHECK(false);
668
391
            }
669
1.18M
            _shared_state = info.shared_state->template cast<SharedState>();
670
1.18M
            _dependency = _shared_state->create_sink_dependency(
671
1.18M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
1.18M
        }
673
1.54M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
1.54M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
1.54M
    }
676
677
2.27M
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
2.27M
    _rows_input_counter =
682
2.27M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
2.27M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
2.27M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
2.27M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
2.27M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
2.27M
    _memory_used_counter =
688
2.27M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
2.27M
    _common_profile->add_info_string("IsColocate",
690
2.27M
                                     std::to_string(_parent->is_colocated_operator()));
691
2.27M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
2.27M
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
2.27M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
2.27M
    return Status::OK();
695
2.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
193k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
193k
    _operator_profile =
638
193k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
193k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
193k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
193k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
193k
    _operator_profile->add_child(_common_profile, true);
647
193k
    _operator_profile->add_child(_custom_profile, true);
648
649
193k
    _operator_profile->set_metadata(_parent->node_id());
650
193k
    _wait_for_finish_dependency_timer =
651
193k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
193k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
193k
    if constexpr (!is_fake_shared) {
654
193k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
193k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
20.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
20.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
20.3k
                                                  ? 0
662
20.3k
                                                  : info.task_idx]
663
20.3k
                                  .get();
664
20.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
173k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
173k
            _shared_state = info.shared_state->template cast<SharedState>();
670
173k
            _dependency = _shared_state->create_sink_dependency(
671
173k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
173k
        }
673
193k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
193k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
193k
    }
676
677
193k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
193k
    _rows_input_counter =
682
193k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
193k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
193k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
193k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
193k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
193k
    _memory_used_counter =
688
193k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
193k
    _common_profile->add_info_string("IsColocate",
690
193k
                                     std::to_string(_parent->is_colocated_operator()));
691
193k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
193k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
193k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
193k
    return Status::OK();
695
193k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
2
    _operator_profile =
638
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
2
    _operator_profile->add_child(_common_profile, true);
647
2
    _operator_profile->add_child(_custom_profile, true);
648
649
2
    _operator_profile->set_metadata(_parent->node_id());
650
2
    _wait_for_finish_dependency_timer =
651
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
2
    if constexpr (!is_fake_shared) {
654
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
2
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
2
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
2
            _shared_state = info.shared_state->template cast<SharedState>();
670
2
            _dependency = _shared_state->create_sink_dependency(
671
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
2
        }
673
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
2
    }
676
677
2
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
2
    _rows_input_counter =
682
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
2
    _memory_used_counter =
688
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
2
    _common_profile->add_info_string("IsColocate",
690
2
                                     std::to_string(_parent->is_colocated_operator()));
691
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
2
    return Status::OK();
695
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
270k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
270k
    _operator_profile =
638
270k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
270k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
270k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
270k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
270k
    _operator_profile->add_child(_common_profile, true);
647
270k
    _operator_profile->add_child(_custom_profile, true);
648
649
270k
    _operator_profile->set_metadata(_parent->node_id());
650
270k
    _wait_for_finish_dependency_timer =
651
270k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
270k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
270k
    if constexpr (!is_fake_shared) {
654
270k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
270k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
270k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
270k
            _shared_state = info.shared_state->template cast<SharedState>();
670
270k
            _dependency = _shared_state->create_sink_dependency(
671
270k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
270k
        }
673
270k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
270k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
270k
    }
676
677
270k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
270k
    _rows_input_counter =
682
270k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
270k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
270k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
270k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
270k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
270k
    _memory_used_counter =
688
270k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
270k
    _common_profile->add_info_string("IsColocate",
690
270k
                                     std::to_string(_parent->is_colocated_operator()));
691
270k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
270k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
270k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
270k
    return Status::OK();
695
270k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
30
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
30
    _operator_profile =
638
30
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
30
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
30
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
30
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
30
    _operator_profile->add_child(_common_profile, true);
647
30
    _operator_profile->add_child(_custom_profile, true);
648
649
30
    _operator_profile->set_metadata(_parent->node_id());
650
30
    _wait_for_finish_dependency_timer =
651
30
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
30
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
30
    if constexpr (!is_fake_shared) {
654
30
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
30
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
30
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
30
            _shared_state = info.shared_state->template cast<SharedState>();
670
30
            _dependency = _shared_state->create_sink_dependency(
671
30
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
30
        }
673
30
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
30
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
30
    }
676
677
30
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
30
    _rows_input_counter =
682
30
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
30
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
30
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
30
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
30
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
30
    _memory_used_counter =
688
30
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
30
    _common_profile->add_info_string("IsColocate",
690
30
                                     std::to_string(_parent->is_colocated_operator()));
691
30
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
30
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
30
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
30
    return Status::OK();
695
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
10.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
10.4k
    _operator_profile =
638
10.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
10.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
10.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
10.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
10.4k
    _operator_profile->add_child(_common_profile, true);
647
10.4k
    _operator_profile->add_child(_custom_profile, true);
648
649
10.4k
    _operator_profile->set_metadata(_parent->node_id());
650
10.4k
    _wait_for_finish_dependency_timer =
651
10.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
10.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
10.4k
    if constexpr (!is_fake_shared) {
654
10.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
10.4k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
10.4k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
10.4k
            _shared_state = info.shared_state->template cast<SharedState>();
670
10.4k
            _dependency = _shared_state->create_sink_dependency(
671
10.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
10.4k
        }
673
10.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
10.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
10.4k
    }
676
677
10.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
10.4k
    _rows_input_counter =
682
10.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
10.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
10.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
10.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
10.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
10.4k
    _memory_used_counter =
688
10.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
10.4k
    _common_profile->add_info_string("IsColocate",
690
10.4k
                                     std::to_string(_parent->is_colocated_operator()));
691
10.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
10.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
10.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
10.4k
    return Status::OK();
695
10.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
8.17k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
8.17k
    _operator_profile =
638
8.17k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
8.17k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
8.17k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
8.17k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
8.17k
    _operator_profile->add_child(_common_profile, true);
647
8.17k
    _operator_profile->add_child(_custom_profile, true);
648
649
8.17k
    _operator_profile->set_metadata(_parent->node_id());
650
8.17k
    _wait_for_finish_dependency_timer =
651
8.17k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
8.17k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
8.17k
    if constexpr (!is_fake_shared) {
654
8.17k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
8.17k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
8.17k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
8.17k
            _shared_state = info.shared_state->template cast<SharedState>();
670
8.17k
            _dependency = _shared_state->create_sink_dependency(
671
8.17k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
8.17k
        }
673
8.17k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
8.17k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
8.17k
    }
676
677
8.17k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
8.17k
    _rows_input_counter =
682
8.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
8.17k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
8.17k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
8.17k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
8.17k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
8.17k
    _memory_used_counter =
688
8.17k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
8.17k
    _common_profile->add_info_string("IsColocate",
690
8.17k
                                     std::to_string(_parent->is_colocated_operator()));
691
8.17k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
8.17k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
8.17k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
8.17k
    return Status::OK();
695
8.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
170k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
170k
    _operator_profile =
638
170k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
170k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
170k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
170k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
170k
    _operator_profile->add_child(_common_profile, true);
647
170k
    _operator_profile->add_child(_custom_profile, true);
648
649
170k
    _operator_profile->set_metadata(_parent->node_id());
650
170k
    _wait_for_finish_dependency_timer =
651
170k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
170k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
170k
    if constexpr (!is_fake_shared) {
654
170k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
170k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
170k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
170k
            _shared_state = info.shared_state->template cast<SharedState>();
670
170k
            _dependency = _shared_state->create_sink_dependency(
671
170k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
170k
        }
673
170k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
170k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
170k
    }
676
677
170k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
170k
    _rows_input_counter =
682
170k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
170k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
170k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
170k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
170k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
170k
    _memory_used_counter =
688
170k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
170k
    _common_profile->add_info_string("IsColocate",
690
170k
                                     std::to_string(_parent->is_colocated_operator()));
691
170k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
170k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
170k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
170k
    return Status::OK();
695
170k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
1.35k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
1.35k
    _operator_profile =
638
1.35k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
1.35k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
1.35k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
1.35k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
1.35k
    _operator_profile->add_child(_common_profile, true);
647
1.35k
    _operator_profile->add_child(_custom_profile, true);
648
649
1.35k
    _operator_profile->set_metadata(_parent->node_id());
650
1.35k
    _wait_for_finish_dependency_timer =
651
1.35k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
1.35k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
1.35k
    if constexpr (!is_fake_shared) {
654
1.35k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
1.35k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
1.35k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
1.35k
            _shared_state = info.shared_state->template cast<SharedState>();
670
1.35k
            _dependency = _shared_state->create_sink_dependency(
671
1.35k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
1.35k
        }
673
1.35k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
1.35k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
1.35k
    }
676
677
1.35k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
1.35k
    _rows_input_counter =
682
1.35k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
1.35k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
1.35k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
1.35k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
1.35k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
1.35k
    _memory_used_counter =
688
1.35k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
1.35k
    _common_profile->add_info_string("IsColocate",
690
1.35k
                                     std::to_string(_parent->is_colocated_operator()));
691
1.35k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
1.35k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
1.35k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
1.35k
    return Status::OK();
695
1.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
735k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
735k
    _operator_profile =
638
735k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
735k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
735k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
735k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
735k
    _operator_profile->add_child(_common_profile, true);
647
735k
    _operator_profile->add_child(_custom_profile, true);
648
649
735k
    _operator_profile->set_metadata(_parent->node_id());
650
735k
    _wait_for_finish_dependency_timer =
651
735k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
735k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
    if constexpr (!is_fake_shared) {
654
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
                                                  ? 0
662
                                                  : info.task_idx]
663
                                  .get();
664
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
            _shared_state = info.shared_state->template cast<SharedState>();
670
            _dependency = _shared_state->create_sink_dependency(
671
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
        }
673
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
    }
676
677
735k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
735k
    _rows_input_counter =
682
735k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
735k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
735k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
735k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
735k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
735k
    _memory_used_counter =
688
735k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
735k
    _common_profile->add_info_string("IsColocate",
690
735k
                                     std::to_string(_parent->is_colocated_operator()));
691
735k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
735k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
735k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
735k
    return Status::OK();
695
735k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
9.20k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
9.20k
    _operator_profile =
638
9.20k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
9.20k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
9.20k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
9.20k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
9.20k
    _operator_profile->add_child(_common_profile, true);
647
9.20k
    _operator_profile->add_child(_custom_profile, true);
648
649
9.20k
    _operator_profile->set_metadata(_parent->node_id());
650
9.20k
    _wait_for_finish_dependency_timer =
651
9.20k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
9.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
9.20k
    if constexpr (!is_fake_shared) {
654
9.20k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
9.20k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
9.20k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
9.20k
            _shared_state = info.shared_state->template cast<SharedState>();
670
9.20k
            _dependency = _shared_state->create_sink_dependency(
671
9.20k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
9.20k
        }
673
9.20k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
9.20k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
9.20k
    }
676
677
9.20k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
9.20k
    _rows_input_counter =
682
9.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
9.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
9.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
9.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
9.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
9.20k
    _memory_used_counter =
688
9.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
9.20k
    _common_profile->add_info_string("IsColocate",
690
9.20k
                                     std::to_string(_parent->is_colocated_operator()));
691
9.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
9.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
9.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
9.20k
    return Status::OK();
695
9.20k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
568
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
568
    _operator_profile =
638
568
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
568
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
568
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
568
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
568
    _operator_profile->add_child(_common_profile, true);
647
568
    _operator_profile->add_child(_custom_profile, true);
648
649
568
    _operator_profile->set_metadata(_parent->node_id());
650
568
    _wait_for_finish_dependency_timer =
651
568
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
568
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
568
    if constexpr (!is_fake_shared) {
654
568
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
568
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
568
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
568
            _shared_state = info.shared_state->template cast<SharedState>();
670
568
            _dependency = _shared_state->create_sink_dependency(
671
568
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
568
        }
673
568
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
568
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
568
    }
676
677
568
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
568
    _rows_input_counter =
682
568
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
568
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
568
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
568
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
568
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
568
    _memory_used_counter =
688
568
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
568
    _common_profile->add_info_string("IsColocate",
690
568
                                     std::to_string(_parent->is_colocated_operator()));
691
568
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
568
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
568
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
568
    return Status::OK();
695
568
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
5.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
5.15k
    _operator_profile =
638
5.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
5.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
5.15k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
5.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
5.15k
    _operator_profile->add_child(_common_profile, true);
647
5.15k
    _operator_profile->add_child(_custom_profile, true);
648
649
5.15k
    _operator_profile->set_metadata(_parent->node_id());
650
5.15k
    _wait_for_finish_dependency_timer =
651
5.15k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
5.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
5.15k
    if constexpr (!is_fake_shared) {
654
5.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
5.15k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
5.15k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
5.15k
            _shared_state = info.shared_state->template cast<SharedState>();
670
5.15k
            _dependency = _shared_state->create_sink_dependency(
671
5.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
5.15k
        }
673
5.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
5.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
5.15k
    }
676
677
5.15k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
5.15k
    _rows_input_counter =
682
5.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
5.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
5.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
5.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
5.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
5.15k
    _memory_used_counter =
688
5.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
5.15k
    _common_profile->add_info_string("IsColocate",
690
5.15k
                                     std::to_string(_parent->is_colocated_operator()));
691
5.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
5.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
5.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
5.15k
    return Status::OK();
695
5.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
12.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
12.7k
    _operator_profile =
638
12.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
12.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
12.7k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
12.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
12.7k
    _operator_profile->add_child(_common_profile, true);
647
12.7k
    _operator_profile->add_child(_custom_profile, true);
648
649
12.7k
    _operator_profile->set_metadata(_parent->node_id());
650
12.7k
    _wait_for_finish_dependency_timer =
651
12.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
12.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
12.7k
    if constexpr (!is_fake_shared) {
654
12.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
12.7k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
12.7k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
12.7k
            _shared_state = info.shared_state->template cast<SharedState>();
670
12.7k
            _dependency = _shared_state->create_sink_dependency(
671
12.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
12.7k
        }
673
12.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
12.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
12.7k
    }
676
677
12.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
12.7k
    _rows_input_counter =
682
12.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
12.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
12.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
12.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
12.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
12.7k
    _memory_used_counter =
688
12.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
12.7k
    _common_profile->add_info_string("IsColocate",
690
12.7k
                                     std::to_string(_parent->is_colocated_operator()));
691
12.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
12.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
12.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
12.7k
    return Status::OK();
695
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
332k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
332k
    _operator_profile =
638
332k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
332k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
332k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
332k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
332k
    _operator_profile->add_child(_common_profile, true);
647
332k
    _operator_profile->add_child(_custom_profile, true);
648
649
332k
    _operator_profile->set_metadata(_parent->node_id());
650
332k
    _wait_for_finish_dependency_timer =
651
332k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
332k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
332k
    if constexpr (!is_fake_shared) {
654
332k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
332k
            info.shared_state_map.end()) {
656
331k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
331k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
331k
            }
659
331k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
331k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
331k
                                                  ? 0
662
331k
                                                  : info.task_idx]
663
331k
                                  .get();
664
331k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
331k
        } else {
666
391
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
391
                DCHECK(false);
668
391
            }
669
391
            _shared_state = info.shared_state->template cast<SharedState>();
670
391
            _dependency = _shared_state->create_sink_dependency(
671
391
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
391
        }
673
332k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
332k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
332k
    }
676
677
332k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
332k
    _rows_input_counter =
682
332k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
332k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
332k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
332k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
332k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
332k
    _memory_used_counter =
688
332k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
332k
    _common_profile->add_info_string("IsColocate",
690
332k
                                     std::to_string(_parent->is_colocated_operator()));
691
332k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
332k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
332k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
332k
    return Status::OK();
695
332k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
527k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
527k
    _operator_profile =
638
527k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
527k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
527k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
527k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
527k
    _operator_profile->add_child(_common_profile, true);
647
527k
    _operator_profile->add_child(_custom_profile, true);
648
649
527k
    _operator_profile->set_metadata(_parent->node_id());
650
527k
    _wait_for_finish_dependency_timer =
651
527k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
527k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
527k
    if constexpr (!is_fake_shared) {
654
527k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
527k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
1.43k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
1.43k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
1.43k
                                                  ? 0
662
1.43k
                                                  : info.task_idx]
663
1.43k
                                  .get();
664
1.43k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
525k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
525k
            _shared_state = info.shared_state->template cast<SharedState>();
670
525k
            _dependency = _shared_state->create_sink_dependency(
671
525k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
525k
        }
673
527k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
527k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
527k
    }
676
677
527k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
527k
    _rows_input_counter =
682
527k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
527k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
527k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
527k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
527k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
527k
    _memory_used_counter =
688
527k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
527k
    _common_profile->add_info_string("IsColocate",
690
527k
                                     std::to_string(_parent->is_colocated_operator()));
691
527k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
527k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
527k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
527k
    return Status::OK();
695
527k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
111
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
111
    _operator_profile =
638
111
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
111
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
111
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
111
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
111
    _operator_profile->add_child(_common_profile, true);
647
111
    _operator_profile->add_child(_custom_profile, true);
648
649
111
    _operator_profile->set_metadata(_parent->node_id());
650
111
    _wait_for_finish_dependency_timer =
651
111
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
111
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
111
    if constexpr (!is_fake_shared) {
654
111
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
111
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
111
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
111
            _shared_state = info.shared_state->template cast<SharedState>();
670
111
            _dependency = _shared_state->create_sink_dependency(
671
111
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
111
        }
673
111
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
111
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
111
    }
676
677
111
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
111
    _rows_input_counter =
682
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
111
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
111
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
111
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
111
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
111
    _memory_used_counter =
688
111
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
111
    _common_profile->add_info_string("IsColocate",
690
111
                                     std::to_string(_parent->is_colocated_operator()));
691
111
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
111
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
111
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
111
    return Status::OK();
695
111
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
300
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
300
    _operator_profile =
638
300
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
300
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
300
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
300
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
300
    _operator_profile->add_child(_common_profile, true);
647
300
    _operator_profile->add_child(_custom_profile, true);
648
649
300
    _operator_profile->set_metadata(_parent->node_id());
650
300
    _wait_for_finish_dependency_timer =
651
300
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
300
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
300
    if constexpr (!is_fake_shared) {
654
300
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
300
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
300
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
300
            _shared_state = info.shared_state->template cast<SharedState>();
670
300
            _dependency = _shared_state->create_sink_dependency(
671
300
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
300
        }
673
300
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
300
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
300
    }
676
677
300
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
300
    _rows_input_counter =
682
300
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
300
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
300
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
300
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
300
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
300
    _memory_used_counter =
688
300
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
300
    _common_profile->add_info_string("IsColocate",
690
300
                                     std::to_string(_parent->is_colocated_operator()));
691
300
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
300
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
300
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
300
    return Status::OK();
695
300
}
696
697
template <typename SharedState>
698
2.27M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
2.27M
    if (_closed) {
700
2
        return Status::OK();
701
2
    }
702
2.27M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
1.54M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
1.54M
    }
705
2.27M
    _closed = true;
706
2.27M
    return Status::OK();
707
2.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
193k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
193k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
193k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
193k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
193k
    }
705
193k
    _closed = true;
706
193k
    return Status::OK();
707
193k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
1
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
1
    }
705
1
    _closed = true;
706
1
    return Status::OK();
707
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
270k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
270k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
270k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
270k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
270k
    }
705
270k
    _closed = true;
706
270k
    return Status::OK();
707
270k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
22
    if (_closed) {
700
2
        return Status::OK();
701
2
    }
702
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
20
    }
705
20
    _closed = true;
706
20
    return Status::OK();
707
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
10.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
10.4k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
10.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
10.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
10.4k
    }
705
10.4k
    _closed = true;
706
10.4k
    return Status::OK();
707
10.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
8.15k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
8.15k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
8.15k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
8.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
8.15k
    }
705
8.15k
    _closed = true;
706
8.15k
    return Status::OK();
707
8.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
169k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
169k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
169k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
169k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
169k
    }
705
169k
    _closed = true;
706
169k
    return Status::OK();
707
169k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
1.34k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
1.34k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
1.34k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
1.34k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
1.34k
    }
705
1.34k
    _closed = true;
706
1.34k
    return Status::OK();
707
1.34k
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
735k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
735k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
    }
705
735k
    _closed = true;
706
735k
    return Status::OK();
707
735k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
9.19k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
9.19k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
9.19k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
9.19k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
9.19k
    }
705
9.19k
    _closed = true;
706
9.19k
    return Status::OK();
707
9.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
465
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
465
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
465
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
465
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
465
    }
705
465
    _closed = true;
706
465
    return Status::OK();
707
465
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
5.15k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
5.15k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
5.15k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
5.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
5.15k
    }
705
5.15k
    _closed = true;
706
5.15k
    return Status::OK();
707
5.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
12.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
12.7k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
12.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
12.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
12.7k
    }
705
12.7k
    _closed = true;
706
12.7k
    return Status::OK();
707
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
332k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
332k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
332k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
332k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
332k
    }
705
332k
    _closed = true;
706
332k
    return Status::OK();
707
332k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
529k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
529k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
529k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
529k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
529k
    }
705
529k
    _closed = true;
706
529k
    return Status::OK();
707
529k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
108
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
108
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
108
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
108
    }
705
108
    _closed = true;
706
108
    return Status::OK();
707
108
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
300
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
300
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
300
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
300
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
300
    }
705
300
    _closed = true;
706
300
    return Status::OK();
707
300
}
708
709
template <typename LocalStateType>
710
11.9k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
711
11.9k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
712
11.9k
    return pull(state, block, eos);
713
11.9k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
710
455
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
711
455
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
712
455
    return pull(state, block, eos);
713
455
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
710
11.5k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
711
11.5k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
712
11.5k
    return pull(state, block, eos);
713
11.5k
}
714
715
template <typename LocalStateType>
716
834k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
834k
    auto& local_state = get_local_state(state);
718
834k
    if (need_more_input_data(state)) {
719
757k
        local_state._child_block->clear_column_data(
720
757k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
757k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
757k
                state, local_state._child_block.get(), &local_state._child_eos));
723
757k
        *eos = local_state._child_eos;
724
757k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
60.9k
            return Status::OK();
726
60.9k
        }
727
696k
        {
728
696k
            SCOPED_TIMER(local_state.exec_time_counter());
729
696k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
696k
        }
731
696k
    }
732
733
773k
    if (!need_more_input_data(state)) {
734
719k
        SCOPED_TIMER(local_state.exec_time_counter());
735
719k
        bool new_eos = false;
736
719k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
719k
        if (new_eos) {
738
639k
            *eos = true;
739
639k
        } else if (!need_more_input_data(state)) {
740
26.4k
            *eos = false;
741
26.4k
        }
742
719k
    }
743
773k
    return Status::OK();
744
773k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
197k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
197k
    auto& local_state = get_local_state(state);
718
197k
    if (need_more_input_data(state)) {
719
134k
        local_state._child_block->clear_column_data(
720
134k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
134k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
134k
                state, local_state._child_block.get(), &local_state._child_eos));
723
134k
        *eos = local_state._child_eos;
724
134k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
23.0k
            return Status::OK();
726
23.0k
        }
727
110k
        {
728
110k
            SCOPED_TIMER(local_state.exec_time_counter());
729
110k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
110k
        }
731
110k
    }
732
733
174k
    if (!need_more_input_data(state)) {
734
174k
        SCOPED_TIMER(local_state.exec_time_counter());
735
174k
        bool new_eos = false;
736
174k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
174k
        if (new_eos) {
738
120k
            *eos = true;
739
120k
        } else if (!need_more_input_data(state)) {
740
11.7k
            *eos = false;
741
11.7k
        }
742
174k
    }
743
174k
    return Status::OK();
744
174k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
3.62k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
3.62k
    auto& local_state = get_local_state(state);
718
3.62k
    if (need_more_input_data(state)) {
719
2.20k
        local_state._child_block->clear_column_data(
720
2.20k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
2.20k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
2.20k
                state, local_state._child_block.get(), &local_state._child_eos));
723
2.20k
        *eos = local_state._child_eos;
724
2.20k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
307
            return Status::OK();
726
307
        }
727
1.90k
        {
728
1.90k
            SCOPED_TIMER(local_state.exec_time_counter());
729
1.90k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
1.90k
        }
731
1.90k
    }
732
733
3.32k
    if (!need_more_input_data(state)) {
734
3.32k
        SCOPED_TIMER(local_state.exec_time_counter());
735
3.32k
        bool new_eos = false;
736
3.32k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
3.32k
        if (new_eos) {
738
1.55k
            *eos = true;
739
1.76k
        } else if (!need_more_input_data(state)) {
740
1.42k
            *eos = false;
741
1.42k
        }
742
3.32k
    }
743
3.31k
    return Status::OK();
744
3.31k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
4.83k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
4.83k
    auto& local_state = get_local_state(state);
718
4.83k
    if (need_more_input_data(state)) {
719
4.83k
        local_state._child_block->clear_column_data(
720
4.83k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
4.83k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
4.83k
                state, local_state._child_block.get(), &local_state._child_eos));
723
4.83k
        *eos = local_state._child_eos;
724
4.83k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
1.87k
            return Status::OK();
726
1.87k
        }
727
2.95k
        {
728
2.95k
            SCOPED_TIMER(local_state.exec_time_counter());
729
2.95k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
2.95k
        }
731
2.95k
    }
732
733
2.95k
    if (!need_more_input_data(state)) {
734
2.95k
        SCOPED_TIMER(local_state.exec_time_counter());
735
2.95k
        bool new_eos = false;
736
2.95k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
2.95k
        if (new_eos) {
738
1.90k
            *eos = true;
739
1.90k
        } else if (!need_more_input_data(state)) {
740
0
            *eos = false;
741
0
        }
742
2.95k
    }
743
2.95k
    return Status::OK();
744
2.95k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
42.5k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
42.5k
    auto& local_state = get_local_state(state);
718
42.5k
    if (need_more_input_data(state)) {
719
42.4k
        local_state._child_block->clear_column_data(
720
42.4k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
42.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
42.4k
                state, local_state._child_block.get(), &local_state._child_eos));
723
42.4k
        *eos = local_state._child_eos;
724
42.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
7.47k
            return Status::OK();
726
7.47k
        }
727
35.0k
        {
728
35.0k
            SCOPED_TIMER(local_state.exec_time_counter());
729
35.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
35.0k
        }
731
35.0k
    }
732
733
35.0k
    if (!need_more_input_data(state)) {
734
16.1k
        SCOPED_TIMER(local_state.exec_time_counter());
735
16.1k
        bool new_eos = false;
736
16.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
16.1k
        if (new_eos) {
738
15.9k
            *eos = true;
739
15.9k
        } else if (!need_more_input_data(state)) {
740
62
            *eos = false;
741
62
        }
742
16.1k
    }
743
35.0k
    return Status::OK();
744
35.0k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
545k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
545k
    auto& local_state = get_local_state(state);
718
545k
    if (need_more_input_data(state)) {
719
545k
        local_state._child_block->clear_column_data(
720
545k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
545k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
545k
                state, local_state._child_block.get(), &local_state._child_eos));
723
545k
        *eos = local_state._child_eos;
724
545k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
24.5k
            return Status::OK();
726
24.5k
        }
727
521k
        {
728
521k
            SCOPED_TIMER(local_state.exec_time_counter());
729
521k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
521k
        }
731
521k
    }
732
733
520k
    if (!need_more_input_data(state)) {
734
486k
        SCOPED_TIMER(local_state.exec_time_counter());
735
486k
        bool new_eos = false;
736
486k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
486k
        if (new_eos) {
738
485k
            *eos = true;
739
485k
        } else if (!need_more_input_data(state)) {
740
0
            *eos = false;
741
0
        }
742
486k
    }
743
520k
    return Status::OK();
744
520k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
34.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
34.7k
    auto& local_state = get_local_state(state);
718
34.7k
    if (need_more_input_data(state)) {
719
21.8k
        local_state._child_block->clear_column_data(
720
21.8k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
21.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
21.8k
                state, local_state._child_block.get(), &local_state._child_eos));
723
21.8k
        *eos = local_state._child_eos;
724
21.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
3.21k
            return Status::OK();
726
3.21k
        }
727
18.6k
        {
728
18.6k
            SCOPED_TIMER(local_state.exec_time_counter());
729
18.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
18.6k
        }
731
18.6k
    }
732
733
31.5k
    if (!need_more_input_data(state)) {
734
30.8k
        SCOPED_TIMER(local_state.exec_time_counter());
735
30.8k
        bool new_eos = false;
736
30.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
30.8k
        if (new_eos) {
738
10.4k
            *eos = true;
739
20.4k
        } else if (!need_more_input_data(state)) {
740
12.8k
            *eos = false;
741
12.8k
        }
742
30.8k
    }
743
31.5k
    return Status::OK();
744
31.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
6.17k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
6.17k
    auto& local_state = get_local_state(state);
718
6.17k
    if (need_more_input_data(state)) {
719
5.81k
        local_state._child_block->clear_column_data(
720
5.81k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
5.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
5.81k
                state, local_state._child_block.get(), &local_state._child_eos));
723
5.81k
        *eos = local_state._child_eos;
724
5.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
386
            return Status::OK();
726
386
        }
727
5.42k
        {
728
5.42k
            SCOPED_TIMER(local_state.exec_time_counter());
729
5.42k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
5.42k
        }
731
5.42k
    }
732
733
5.79k
    if (!need_more_input_data(state)) {
734
5.79k
        SCOPED_TIMER(local_state.exec_time_counter());
735
5.79k
        bool new_eos = false;
736
5.79k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
5.79k
        if (new_eos) {
738
3.94k
            *eos = true;
739
3.94k
        } else if (!need_more_input_data(state)) {
740
374
            *eos = false;
741
374
        }
742
5.79k
    }
743
5.79k
    return Status::OK();
744
5.79k
}
745
746
template <typename Writer, typename Parent>
747
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
748
80.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
80.8k
    RETURN_IF_ERROR(Base::init(state, info));
750
80.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
80.8k
                                                         "AsyncWriterDependency", true);
752
80.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
80.8k
                             _finish_dependency));
754
755
80.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
80.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
80.8k
    return Status::OK();
758
80.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
481
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
481
    RETURN_IF_ERROR(Base::init(state, info));
750
481
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
481
                                                         "AsyncWriterDependency", true);
752
481
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
481
                             _finish_dependency));
754
755
481
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
481
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
481
    return Status::OK();
758
481
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
80
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
80
    RETURN_IF_ERROR(Base::init(state, info));
750
80
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
80
                                                         "AsyncWriterDependency", true);
752
80
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
80
                             _finish_dependency));
754
755
80
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
80
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
80
    return Status::OK();
758
80
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
65.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
65.8k
    RETURN_IF_ERROR(Base::init(state, info));
750
65.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
65.8k
                                                         "AsyncWriterDependency", true);
752
65.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
65.8k
                             _finish_dependency));
754
755
65.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
65.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
65.8k
    return Status::OK();
758
65.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
5.76k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
5.76k
    RETURN_IF_ERROR(Base::init(state, info));
750
5.76k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
5.76k
                                                         "AsyncWriterDependency", true);
752
5.76k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
5.76k
                             _finish_dependency));
754
755
5.76k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
5.76k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
5.76k
    return Status::OK();
758
5.76k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
5.22k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
5.22k
    RETURN_IF_ERROR(Base::init(state, info));
750
5.22k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
5.22k
                                                         "AsyncWriterDependency", true);
752
5.22k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
5.22k
                             _finish_dependency));
754
755
5.22k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
5.22k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
5.22k
    return Status::OK();
758
5.22k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
3.23k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
3.23k
    RETURN_IF_ERROR(Base::init(state, info));
750
3.23k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
3.23k
                                                         "AsyncWriterDependency", true);
752
3.23k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
3.23k
                             _finish_dependency));
754
755
3.23k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
3.23k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
3.23k
    return Status::OK();
758
3.23k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
748
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
156
    RETURN_IF_ERROR(Base::init(state, info));
750
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
156
                                                         "AsyncWriterDependency", true);
752
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
156
                             _finish_dependency));
754
755
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
156
    return Status::OK();
758
156
}
759
760
template <typename Writer, typename Parent>
761
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
762
81.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
81.1k
    RETURN_IF_ERROR(Base::open(state));
764
81.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
680k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
599k
        RETURN_IF_ERROR(
767
599k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
599k
    }
769
81.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
81.1k
    return Status::OK();
771
81.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
483
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
483
    RETURN_IF_ERROR(Base::open(state));
764
483
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
2.60k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
2.11k
        RETURN_IF_ERROR(
767
2.11k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
2.11k
    }
769
483
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
483
    return Status::OK();
771
483
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
80
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
80
    RETURN_IF_ERROR(Base::open(state));
764
80
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
388
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
308
        RETURN_IF_ERROR(
767
308
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
308
    }
769
80
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
80
    return Status::OK();
771
80
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
66.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
66.2k
    RETURN_IF_ERROR(Base::open(state));
764
66.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
456k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
390k
        RETURN_IF_ERROR(
767
390k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
390k
    }
769
66.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
66.2k
    return Status::OK();
771
66.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
5.74k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
5.74k
    RETURN_IF_ERROR(Base::open(state));
764
5.74k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
44.2k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
38.4k
        RETURN_IF_ERROR(
767
38.4k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
38.4k
    }
769
5.74k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
5.74k
    return Status::OK();
771
5.74k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
5.22k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
5.22k
    RETURN_IF_ERROR(Base::open(state));
764
5.22k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
134k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
129k
        RETURN_IF_ERROR(
767
129k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
129k
    }
769
5.22k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
5.22k
    return Status::OK();
771
5.22k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
3.23k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
3.23k
    RETURN_IF_ERROR(Base::open(state));
764
3.23k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
41.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
37.8k
        RETURN_IF_ERROR(
767
37.8k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
37.8k
    }
769
3.23k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
3.23k
    return Status::OK();
771
3.23k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
762
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
156
    RETURN_IF_ERROR(Base::open(state));
764
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
630
        RETURN_IF_ERROR(
767
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
630
    }
769
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
156
    return Status::OK();
771
156
}
772
773
template <typename Writer, typename Parent>
774
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
775
101k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
101k
    return _writer->sink(block, eos);
777
101k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
2.00k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
2.00k
    return _writer->sink(block, eos);
777
2.00k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
104
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
104
    return _writer->sink(block, eos);
777
104
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
77.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
77.5k
    return _writer->sink(block, eos);
777
77.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
6.79k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
6.79k
    return _writer->sink(block, eos);
777
6.79k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
9.49k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
9.49k
    return _writer->sink(block, eos);
777
9.49k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
5.16k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
5.16k
    return _writer->sink(block, eos);
777
5.16k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
775
306
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
306
    return _writer->sink(block, eos);
777
306
}
778
779
template <typename Writer, typename Parent>
780
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
781
81.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
81.2k
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
81.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
81.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
81.2k
    if (_writer) {
789
81.2k
        Status st = _writer->get_writer_status();
790
81.2k
        if (exec_status.ok()) {
791
81.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
81.2k
                                                       : Status::Cancelled("force close"));
793
81.2k
        } else {
794
33
            _writer->force_close(exec_status);
795
33
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
81.2k
        RETURN_IF_ERROR(st);
800
81.2k
    }
801
81.2k
    return Base::close(state, exec_status);
802
81.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
471
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
471
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
471
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
471
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
471
    if (_writer) {
789
471
        Status st = _writer->get_writer_status();
790
471
        if (exec_status.ok()) {
791
471
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
471
                                                       : Status::Cancelled("force close"));
793
471
        } else {
794
0
            _writer->force_close(exec_status);
795
0
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
471
        RETURN_IF_ERROR(st);
800
471
    }
801
471
    return Base::close(state, exec_status);
802
471
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
80
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
80
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
80
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
80
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
80
    if (_writer) {
789
80
        Status st = _writer->get_writer_status();
790
80
        if (exec_status.ok()) {
791
80
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
80
                                                       : Status::Cancelled("force close"));
793
80
        } else {
794
0
            _writer->force_close(exec_status);
795
0
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
80
        RETURN_IF_ERROR(st);
800
80
    }
801
80
    return Base::close(state, exec_status);
802
80
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
66.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
66.3k
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
66.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
66.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
66.3k
    if (_writer) {
789
66.3k
        Status st = _writer->get_writer_status();
790
66.3k
        if (exec_status.ok()) {
791
66.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
66.3k
                                                       : Status::Cancelled("force close"));
793
66.3k
        } else {
794
37
            _writer->force_close(exec_status);
795
37
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
66.3k
        RETURN_IF_ERROR(st);
800
66.3k
    }
801
66.2k
    return Base::close(state, exec_status);
802
66.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
5.75k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
5.75k
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
5.75k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
5.75k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
5.76k
    if (_writer) {
789
5.76k
        Status st = _writer->get_writer_status();
790
5.76k
        if (exec_status.ok()) {
791
5.76k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
5.76k
                                                       : Status::Cancelled("force close"));
793
5.76k
        } else {
794
0
            _writer->force_close(exec_status);
795
0
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
5.76k
        RETURN_IF_ERROR(st);
800
5.76k
    }
801
5.75k
    return Base::close(state, exec_status);
802
5.75k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
5.22k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
5.22k
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
5.22k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
5.22k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
5.22k
    if (_writer) {
789
5.22k
        Status st = _writer->get_writer_status();
790
5.22k
        if (exec_status.ok()) {
791
5.22k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
5.22k
                                                       : Status::Cancelled("force close"));
793
5.22k
        } else {
794
0
            _writer->force_close(exec_status);
795
0
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
5.22k
        RETURN_IF_ERROR(st);
800
5.22k
    }
801
5.22k
    return Base::close(state, exec_status);
802
5.22k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
3.23k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
3.23k
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
3.23k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
3.23k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
3.23k
    if (_writer) {
789
3.22k
        Status st = _writer->get_writer_status();
790
3.23k
        if (exec_status.ok()) {
791
3.23k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
3.23k
                                                       : Status::Cancelled("force close"));
793
18.4E
        } else {
794
18.4E
            _writer->force_close(exec_status);
795
18.4E
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
3.22k
        RETURN_IF_ERROR(st);
800
3.22k
    }
801
3.23k
    return Base::close(state, exec_status);
802
3.23k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
781
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
156
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
156
    if (_writer) {
789
156
        Status st = _writer->get_writer_status();
790
156
        if (exec_status.ok()) {
791
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
156
                                                       : Status::Cancelled("force close"));
793
156
        } else {
794
0
            _writer->force_close(exec_status);
795
0
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
156
        RETURN_IF_ERROR(st);
800
156
    }
801
156
    return Base::close(state, exec_status);
802
156
}
803
804
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
805
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
806
DECLARE_OPERATOR(ResultSinkLocalState)
807
DECLARE_OPERATOR(JdbcTableSinkLocalState)
808
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
809
DECLARE_OPERATOR(ResultFileSinkLocalState)
810
DECLARE_OPERATOR(OlapTableSinkLocalState)
811
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
812
DECLARE_OPERATOR(HiveTableSinkLocalState)
813
DECLARE_OPERATOR(TVFTableSinkLocalState)
814
DECLARE_OPERATOR(IcebergTableSinkLocalState)
815
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
816
DECLARE_OPERATOR(MCTableSinkLocalState)
817
DECLARE_OPERATOR(AnalyticSinkLocalState)
818
DECLARE_OPERATOR(BlackholeSinkLocalState)
819
DECLARE_OPERATOR(SortSinkLocalState)
820
DECLARE_OPERATOR(SpillSortSinkLocalState)
821
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
822
DECLARE_OPERATOR(AggSinkLocalState)
823
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
824
DECLARE_OPERATOR(ExchangeSinkLocalState)
825
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
826
DECLARE_OPERATOR(UnionSinkLocalState)
827
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
828
DECLARE_OPERATOR(PartitionSortSinkLocalState)
829
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
830
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
831
DECLARE_OPERATOR(SetSinkLocalState<true>)
832
DECLARE_OPERATOR(SetSinkLocalState<false>)
833
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
834
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
835
DECLARE_OPERATOR(CacheSinkLocalState)
836
DECLARE_OPERATOR(DictSinkLocalState)
837
DECLARE_OPERATOR(RecCTESinkLocalState)
838
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
839
840
#undef DECLARE_OPERATOR
841
842
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
843
DECLARE_OPERATOR(HashJoinProbeLocalState)
844
DECLARE_OPERATOR(OlapScanLocalState)
845
DECLARE_OPERATOR(GroupCommitLocalState)
846
DECLARE_OPERATOR(JDBCScanLocalState)
847
DECLARE_OPERATOR(FileScanLocalState)
848
DECLARE_OPERATOR(EsScanLocalState)
849
DECLARE_OPERATOR(AnalyticLocalState)
850
DECLARE_OPERATOR(SortLocalState)
851
DECLARE_OPERATOR(SpillSortLocalState)
852
DECLARE_OPERATOR(LocalMergeSortLocalState)
853
DECLARE_OPERATOR(AggLocalState)
854
DECLARE_OPERATOR(PartitionedAggLocalState)
855
DECLARE_OPERATOR(TableFunctionLocalState)
856
DECLARE_OPERATOR(ExchangeLocalState)
857
DECLARE_OPERATOR(RepeatLocalState)
858
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
859
DECLARE_OPERATOR(AssertNumRowsLocalState)
860
DECLARE_OPERATOR(EmptySetLocalState)
861
DECLARE_OPERATOR(UnionSourceLocalState)
862
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
863
DECLARE_OPERATOR(PartitionSortSourceLocalState)
864
DECLARE_OPERATOR(SetSourceLocalState<true>)
865
DECLARE_OPERATOR(SetSourceLocalState<false>)
866
DECLARE_OPERATOR(DataGenLocalState)
867
DECLARE_OPERATOR(SchemaScanLocalState)
868
DECLARE_OPERATOR(MetaScanLocalState)
869
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
870
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
871
DECLARE_OPERATOR(CacheSourceLocalState)
872
DECLARE_OPERATOR(RecCTESourceLocalState)
873
DECLARE_OPERATOR(RecCTEScanLocalState)
874
875
#ifdef BE_TEST
876
DECLARE_OPERATOR(MockLocalState)
877
DECLARE_OPERATOR(MockScanLocalState)
878
#endif
879
#undef DECLARE_OPERATOR
880
881
template class StreamingOperatorX<AssertNumRowsLocalState>;
882
template class StreamingOperatorX<SelectLocalState>;
883
884
template class StatefulOperatorX<HashJoinProbeLocalState>;
885
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
886
template class StatefulOperatorX<RepeatLocalState>;
887
template class StatefulOperatorX<MaterializationLocalState>;
888
template class StatefulOperatorX<StreamingAggLocalState>;
889
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
890
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
891
template class StatefulOperatorX<TableFunctionLocalState>;
892
893
template class PipelineXSinkLocalState<HashJoinSharedState>;
894
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
895
template class PipelineXSinkLocalState<SortSharedState>;
896
template class PipelineXSinkLocalState<SpillSortSharedState>;
897
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
898
template class PipelineXSinkLocalState<AnalyticSharedState>;
899
template class PipelineXSinkLocalState<AggSharedState>;
900
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
901
template class PipelineXSinkLocalState<FakeSharedState>;
902
template class PipelineXSinkLocalState<UnionSharedState>;
903
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
904
template class PipelineXSinkLocalState<MultiCastSharedState>;
905
template class PipelineXSinkLocalState<SetSharedState>;
906
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
907
template class PipelineXSinkLocalState<BasicSharedState>;
908
template class PipelineXSinkLocalState<DataQueueSharedState>;
909
template class PipelineXSinkLocalState<RecCTESharedState>;
910
911
template class PipelineXLocalState<HashJoinSharedState>;
912
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
913
template class PipelineXLocalState<SortSharedState>;
914
template class PipelineXLocalState<SpillSortSharedState>;
915
template class PipelineXLocalState<NestedLoopJoinSharedState>;
916
template class PipelineXLocalState<AnalyticSharedState>;
917
template class PipelineXLocalState<AggSharedState>;
918
template class PipelineXLocalState<PartitionedAggSharedState>;
919
template class PipelineXLocalState<FakeSharedState>;
920
template class PipelineXLocalState<UnionSharedState>;
921
template class PipelineXLocalState<DataQueueSharedState>;
922
template class PipelineXLocalState<MultiCastSharedState>;
923
template class PipelineXLocalState<PartitionSortNodeSharedState>;
924
template class PipelineXLocalState<SetSharedState>;
925
template class PipelineXLocalState<LocalExchangeSharedState>;
926
template class PipelineXLocalState<BasicSharedState>;
927
template class PipelineXLocalState<RecCTESharedState>;
928
929
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
930
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
931
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
932
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
933
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
934
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
936
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
937
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
938
939
#ifdef BE_TEST
940
template class OperatorX<DummyOperatorLocalState>;
941
template class DataSinkOperatorX<DummySinkLocalState>;
942
#endif
943
944
#include "common/compile_check_end.h"
945
} // namespace doris