Coverage Report

Created: 2026-07-28 21:07

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 <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
2.46M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.46M
    if (_parent->nereids_id() == -1) {
122
1.31M
        return fmt::format("(id={})", _parent->node_id());
123
1.31M
    } else {
124
1.15M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1.15M
    }
126
2.46M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.6k
    } else {
124
68.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.6k
    }
126
68.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
279k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
279k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
279k
    } else {
124
279k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
279k
    }
126
279k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
25
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
25
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
25
    } else {
124
25
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
25
    }
126
25
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
9.50k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
9.50k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
9.50k
    } else {
124
9.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
9.50k
    }
126
9.50k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
9.09k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
9.09k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
9.08k
    } else {
124
9.08k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
9.08k
    }
126
9.09k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
160k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
160k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
160k
    } else {
124
160k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
160k
    }
126
160k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
466
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
466
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
466
    } else {
124
466
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
466
    }
126
466
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
92
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
92
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
92
    } else {
124
92
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
92
    }
126
92
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1.00M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.00M
    if (_parent->nereids_id() == -1) {
122
441k
        return fmt::format("(id={})", _parent->node_id());
123
562k
    } else {
124
562k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
562k
    }
126
1.00M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
56.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
56.1k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
56.1k
    } else {
124
56.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
56.1k
    }
126
56.1k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
10.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
10.8k
    if (_parent->nereids_id() == -1) {
122
10.8k
        return fmt::format("(id={})", _parent->node_id());
123
10.8k
    } else {
124
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5
    }
126
10.8k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
455
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
455
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
353
    } else {
124
353
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
353
    }
126
455
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.65k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.65k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.63k
    } else {
124
4.63k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.63k
    }
126
4.65k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
858k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
858k
    if (_parent->nereids_id() == -1) {
122
858k
        return fmt::format("(id={})", _parent->node_id());
123
858k
    } else {
124
51
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
51
    }
126
858k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.49M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.49M
    if (_parent->nereids_id() == -1) {
131
912k
        return fmt::format("(id={})", _parent->node_id());
132
912k
    } else {
133
584k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
584k
    }
135
1.49M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
116k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
116k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
116k
    } else {
133
116k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
116k
    }
135
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
282k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
282k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
282k
    } else {
133
282k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
282k
    }
135
282k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
32
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
32
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
32
    } else {
133
32
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
32
    }
135
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
9.50k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
9.50k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
9.50k
    } else {
133
9.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
9.50k
    }
135
9.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
9.13k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
9.13k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
9.12k
    } else {
133
9.12k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
9.12k
    }
135
9.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
161k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
161k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
161k
    } else {
133
161k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
161k
    }
135
161k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
477
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
477
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
477
    } else {
133
477
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
477
    }
135
477
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
102
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
102
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
102
    } else {
133
102
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
102
    }
135
102
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
101
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
101
    if (_parent->nereids_id() == -1) {
131
101
        return fmt::format("(id={})", _parent->node_id());
132
101
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
101
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.16k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.16k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
6.16k
    } else {
133
6.16k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.16k
    }
135
6.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
454
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
454
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
352
    } else {
133
352
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
352
    }
135
454
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.5k
    if (_parent->nereids_id() == -1) {
131
12.5k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
334k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
334k
    if (_parent->nereids_id() == -1) {
131
334k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
334k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
562k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
564k
    if (_parent->nereids_id() == -1) {
131
564k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
562k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
29.5k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
29.5k
    if (_terminated) {
140
1
        return Status::OK();
141
1
    }
142
29.5k
    _terminated = true;
143
29.5k
    return Status::OK();
144
29.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
674
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
674
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
674
    _terminated = true;
143
674
    return Status::OK();
144
674
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.80k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.80k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.80k
    _terminated = true;
143
2.80k
    return Status::OK();
144
2.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
12
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
12
    _terminated = true;
143
12
    return Status::OK();
144
12
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.03k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.03k
    if (_terminated) {
140
1
        return Status::OK();
141
1
    }
142
1.03k
    _terminated = true;
143
1.03k
    return Status::OK();
144
1.03k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
44
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
44
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
44
    _terminated = true;
143
44
    return Status::OK();
144
44
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
710
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
710
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
710
    _terminated = true;
143
710
    return Status::OK();
144
710
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
122
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
122
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
122
    _terminated = true;
143
122
    return Status::OK();
144
122
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
144
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
144
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
144
    _terminated = true;
143
144
    return Status::OK();
144
144
}
145
146
437k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
437k
    return _child && _child->is_serial_operator() && !is_source()
148
437k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
437k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
437k
}
151
152
35.4k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
35.4k
    if (!_child) {
154
30.3k
        return false;
155
30.3k
    }
156
5.05k
    if (_child->is_serial_operator()) {
157
104
        return true;
158
104
    }
159
4.94k
    const auto child_distribution = _child->required_data_distribution(state);
160
4.94k
    return child_distribution.need_local_exchange() &&
161
4.94k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
5.05k
}
163
164
82.9k
const RowDescriptor& OperatorBase::row_desc() const {
165
82.9k
    return _child->row_desc();
166
82.9k
}
167
168
template <typename SharedStateArg>
169
19.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
19.9k
    fmt::memory_buffer debug_string_buffer;
171
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
19.9k
    return fmt::to_string(debug_string_buffer);
173
19.9k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
33
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
33
    fmt::memory_buffer debug_string_buffer;
171
33
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
33
    return fmt::to_string(debug_string_buffer);
173
33
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
3
    fmt::memory_buffer debug_string_buffer;
171
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
3
    return fmt::to_string(debug_string_buffer);
173
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
17
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
17
    fmt::memory_buffer debug_string_buffer;
171
17
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
17
    return fmt::to_string(debug_string_buffer);
173
17
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
19
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
19
    fmt::memory_buffer debug_string_buffer;
171
19
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
19
    return fmt::to_string(debug_string_buffer);
173
19
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
16
    fmt::memory_buffer debug_string_buffer;
171
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
16
    return fmt::to_string(debug_string_buffer);
173
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
19.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
19.8k
    fmt::memory_buffer debug_string_buffer;
171
19.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
19.8k
    return fmt::to_string(debug_string_buffer);
173
19.8k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
1
    fmt::memory_buffer debug_string_buffer;
171
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
1
    return fmt::to_string(debug_string_buffer);
173
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
169
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
32
    fmt::memory_buffer debug_string_buffer;
171
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
32
    return fmt::to_string(debug_string_buffer);
173
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
19.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
19.8k
    fmt::memory_buffer debug_string_buffer;
178
19.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
19.8k
    return fmt::to_string(debug_string_buffer);
180
19.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
17
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
17
    fmt::memory_buffer debug_string_buffer;
178
17
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
17
    return fmt::to_string(debug_string_buffer);
180
17
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
16
    fmt::memory_buffer debug_string_buffer;
178
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
16
    return fmt::to_string(debug_string_buffer);
180
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
49
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
49
    fmt::memory_buffer debug_string_buffer;
178
49
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
49
    return fmt::to_string(debug_string_buffer);
180
49
}
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
176
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
16
    fmt::memory_buffer debug_string_buffer;
178
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
16
    return fmt::to_string(debug_string_buffer);
180
16
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
19.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
19.7k
    fmt::memory_buffer debug_string_buffer;
178
19.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
19.7k
    return fmt::to_string(debug_string_buffer);
180
19.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
19.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
19.9k
    fmt::memory_buffer debug_string_buffer;
184
19.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
19.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
19.9k
                   _is_serial_operator);
187
19.9k
    return fmt::to_string(debug_string_buffer);
188
19.9k
}
189
190
19.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
19.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
19.9k
}
193
194
861k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
861k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
861k
    _nereids_id = tnode.nereids_id;
197
861k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
4.16k
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
4.16k
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
4.16k
            tnode.intermediate_projections_list.size()) {
203
0
            return Status::InternalError(
204
0
                    "intermediate_output_tuple_id_list size:{} not match "
205
0
                    "intermediate_projections_list size:{}",
206
0
                    tnode.intermediate_output_tuple_id_list.size(),
207
0
                    tnode.intermediate_projections_list.size());
208
0
        }
209
4.16k
    }
210
861k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
861k
    _op_name = substr + "_OPERATOR";
212
213
861k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
861k
    } else if (tnode.__isset.conjuncts) {
216
484k
        for (const auto& conjunct : tnode.conjuncts) {
217
484k
            VExprContextSPtr context;
218
484k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
484k
            _conjuncts.emplace_back(context);
220
484k
        }
221
156k
    }
222
223
    // create the projections expr
224
861k
    if (tnode.__isset.projections) {
225
333k
        DCHECK(tnode.__isset.output_tuple_id);
226
333k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
333k
    }
228
861k
    if (!tnode.intermediate_projections_list.empty()) {
229
4.16k
        DCHECK(tnode.__isset.projections) << "no final projections";
230
4.16k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
8.49k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
8.49k
            VExprContextSPtrs projections;
233
8.49k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
8.49k
            _intermediate_projections.push_back(projections);
235
8.49k
        }
236
4.16k
    }
237
861k
    return Status::OK();
238
861k
}
239
240
893k
Status OperatorXBase::prepare(RuntimeState* state) {
241
893k
    for (auto& conjunct : _conjuncts) {
242
484k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
484k
    }
244
893k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
840k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
643k
            return a->execute_cost() < b->execute_cost();
247
643k
        });
248
840k
    };
249
250
901k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
8.49k
        RETURN_IF_ERROR(
252
8.49k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
8.49k
    }
254
893k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
893k
    if (has_output_row_desc()) {
257
333k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
333k
    }
259
260
893k
    for (auto& conjunct : _conjuncts) {
261
484k
        RETURN_IF_ERROR(conjunct->open(state));
262
484k
    }
263
893k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
893k
    for (auto& projections : _intermediate_projections) {
265
8.49k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
8.49k
    }
267
893k
    if (_child && !is_source()) {
268
135k
        RETURN_IF_ERROR(_child->prepare(state));
269
135k
    }
270
271
893k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
893k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
893k
    return Status::OK();
277
893k
}
278
279
6.86k
Status OperatorXBase::terminate(RuntimeState* state) {
280
6.86k
    if (_child && !is_source()) {
281
1.29k
        RETURN_IF_ERROR(_child->terminate(state));
282
1.29k
    }
283
6.86k
    auto result = state->get_local_state_result(operator_id());
284
6.86k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
6.86k
    return result.value()->terminate(state);
288
6.86k
}
289
290
6.91M
Status OperatorXBase::close(RuntimeState* state) {
291
6.91M
    if (_child && !is_source()) {
292
1.27M
        RETURN_IF_ERROR(_child->close(state));
293
1.27M
    }
294
6.91M
    auto result = state->get_local_state_result(operator_id());
295
6.91M
    if (!result) {
296
0
        return result.error();
297
0
    }
298
6.91M
    return result.value()->close(state);
299
6.91M
}
300
301
308k
void PipelineXLocalStateBase::clear_origin_block() {
302
308k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
308k
}
304
305
707k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
707k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
707k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
707k
    return Status::OK();
310
707k
}
311
312
0
bool PipelineXLocalStateBase::is_blockable() const {
313
0
    return std::any_of(_projections.begin(), _projections.end(),
314
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
315
0
}
316
317
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
318
308k
                                     Block* output_block) const {
319
308k
    auto* local_state = state->get_local_state(operator_id());
320
308k
    SCOPED_TIMER(local_state->exec_time_counter());
321
308k
    SCOPED_TIMER(local_state->_projection_timer);
322
308k
    const size_t rows = origin_block->rows();
323
308k
    if (rows == 0) {
324
161k
        return Status::OK();
325
161k
    }
326
146k
    Block input_block = *origin_block;
327
328
146k
    size_t bytes_usage = 0;
329
146k
    ColumnsWithTypeAndName new_columns;
330
146k
    for (const auto& projections : local_state->_intermediate_projections) {
331
1.91k
        if (projections.empty()) {
332
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
333
0
                                         node_id());
334
0
        }
335
1.91k
        new_columns.resize(projections.size());
336
14.8k
        for (int i = 0; i < projections.size(); i++) {
337
12.9k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
338
12.9k
            if (new_columns[i].column->size() != rows) {
339
0
                return Status::InternalError(
340
0
                        "intermediate projection result column size {} not equal input rows {}, "
341
0
                        "expr: {}",
342
0
                        new_columns[i].column->size(), rows,
343
0
                        projections[i]->root()->debug_string());
344
0
            }
345
12.9k
        }
346
1.91k
        Block tmp_block {new_columns};
347
1.91k
        bytes_usage += tmp_block.allocated_bytes();
348
1.91k
        input_block.swap(tmp_block);
349
1.91k
    }
350
351
146k
    if (input_block.rows() != rows) {
352
0
        return Status::InternalError(
353
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
354
0
                "input_block: {}",
355
0
                input_block.rows(), rows, input_block.dump_structure());
356
0
    }
357
677k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
358
677k
        if (is_column_nullable(*to) && !is_column_nullable(*from)) {
359
0
            if (_keep_origin || !from->is_exclusive()) {
360
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
361
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
362
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
363
0
                bytes_usage += null_column.allocated_bytes();
364
0
            } else {
365
0
                to = make_nullable(from, false)->assert_mutable();
366
0
            }
367
677k
        } else {
368
677k
            if (_keep_origin || !from->is_exclusive()) {
369
677k
                to->insert_range_from(*from, 0, rows);
370
677k
                bytes_usage += from->allocated_bytes();
371
18.4E
            } else {
372
18.4E
                to = from->assert_mutable();
373
18.4E
            }
374
677k
        }
375
677k
    };
376
377
146k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
378
146k
            output_block, *_output_row_descriptor);
379
146k
    auto& mutable_block = scoped_mutable_block.mutable_block();
380
146k
    auto& mutable_columns = mutable_block.mutable_columns();
381
147k
    if (rows != 0) {
382
147k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
383
824k
        for (int i = 0; i < mutable_columns.size(); ++i) {
384
677k
            ColumnPtr column_ptr;
385
677k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
386
677k
            if (column_ptr->size() != rows) {
387
0
                return Status::InternalError(
388
0
                        "projection result column size {} not equal input rows {}, expr: {}",
389
0
                        column_ptr->size(), rows,
390
0
                        local_state->_projections[i]->root()->debug_string());
391
0
            }
392
677k
            column_ptr = column_ptr->convert_to_full_column_if_const();
393
677k
            bytes_usage += column_ptr->allocated_bytes();
394
677k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
395
677k
        }
396
147k
        DCHECK(mutable_block.rows() == rows);
397
147k
    }
398
146k
    local_state->_estimate_memory_usage += bytes_usage;
399
400
146k
    return Status::OK();
401
146k
}
402
403
5.10M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
404
5.10M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
405
5.10M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
406
5.10M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
407
5.10M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
408
5.10M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
409
5.10M
            if (_debug_point_count++ % 2 == 0) {
410
5.10M
                return Status::OK();
411
5.10M
            }
412
5.10M
        }
413
5.10M
    });
414
415
5.10M
    Status status;
416
5.10M
    auto* local_state = state->get_local_state(operator_id());
417
5.10M
    Defer defer([&]() {
418
5.10M
        if (status.ok()) {
419
5.10M
            local_state->update_output_block_counters(*block);
420
5.10M
        }
421
5.10M
    });
422
5.10M
    if (_output_row_descriptor) {
423
308k
        local_state->clear_origin_block();
424
308k
        status = get_block(state, &local_state->_origin_block, eos);
425
308k
        if (UNLIKELY(!status.ok())) {
426
20
            return status;
427
20
        }
428
308k
        status = do_projections(state, &local_state->_origin_block, block);
429
308k
        return status;
430
308k
    }
431
4.79M
    status = get_block(state, block, eos);
432
4.79M
    RETURN_IF_ERROR(block->check_type_and_column());
433
4.79M
    return status;
434
4.79M
}
435
436
3.44M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
437
3.44M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
438
6.84k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
439
6.84k
        *eos = true;
440
6.84k
    }
441
442
3.44M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
443
3.44M
        auto op_name = to_lower(_parent->_op_name);
444
3.44M
        auto arg_op_name = dp->param<std::string>("op_name");
445
3.44M
        arg_op_name = to_lower(arg_op_name);
446
447
3.44M
        if (op_name == arg_op_name) {
448
3.44M
            *eos = true;
449
3.44M
        }
450
3.44M
    });
451
452
3.44M
    if (auto rows = block->rows()) {
453
959k
        _num_rows_returned += rows;
454
959k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
455
959k
    }
456
3.44M
}
457
458
29.5k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
459
29.5k
    auto result = state->get_sink_local_state_result();
460
29.5k
    if (!result) {
461
0
        return result.error();
462
0
    }
463
29.5k
    return result.value()->terminate(state);
464
29.5k
}
465
466
19.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
467
19.8k
    fmt::memory_buffer debug_string_buffer;
468
469
19.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
470
19.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
471
19.8k
    return fmt::to_string(debug_string_buffer);
472
19.8k
}
473
474
19.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
475
19.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
476
19.8k
}
477
478
477k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
479
477k
    std::string op_name = "UNKNOWN_SINK";
480
477k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
481
482
478k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
483
478k
        op_name = it->second;
484
478k
    }
485
477k
    _name = op_name + "_OPERATOR";
486
477k
    return Status::OK();
487
477k
}
488
489
326k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
490
326k
    std::string op_name = print_plan_node_type(tnode.node_type);
491
326k
    _nereids_id = tnode.nereids_id;
492
326k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
493
326k
    _name = substr + "_SINK_OPERATOR";
494
326k
    return Status::OK();
495
326k
}
496
497
template <typename LocalStateType>
498
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
499
2.26M
                                                            LocalSinkStateInfo& info) {
500
2.26M
    auto local_state = LocalStateType::create_unique(this, state);
501
2.26M
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.26M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.26M
    return Status::OK();
504
2.26M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
117k
                                                            LocalSinkStateInfo& info) {
500
117k
    auto local_state = LocalStateType::create_unique(this, state);
501
117k
    RETURN_IF_ERROR(local_state->init(state, info));
502
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
117k
    return Status::OK();
504
117k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
494k
                                                            LocalSinkStateInfo& info) {
500
494k
    auto local_state = LocalStateType::create_unique(this, state);
501
494k
    RETURN_IF_ERROR(local_state->init(state, info));
502
494k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
494k
    return Status::OK();
504
494k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
86
                                                            LocalSinkStateInfo& info) {
500
86
    auto local_state = LocalStateType::create_unique(this, state);
501
86
    RETURN_IF_ERROR(local_state->init(state, info));
502
86
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
86
    return Status::OK();
504
86
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3
                                                            LocalSinkStateInfo& info) {
500
3
    auto local_state = LocalStateType::create_unique(this, state);
501
3
    RETURN_IF_ERROR(local_state->init(state, info));
502
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3
    return Status::OK();
504
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
515
                                                            LocalSinkStateInfo& info) {
500
515
    auto local_state = LocalStateType::create_unique(this, state);
501
515
    RETURN_IF_ERROR(local_state->init(state, info));
502
515
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
515
    return Status::OK();
504
515
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
47.7k
                                                            LocalSinkStateInfo& info) {
500
47.7k
    auto local_state = LocalStateType::create_unique(this, state);
501
47.7k
    RETURN_IF_ERROR(local_state->init(state, info));
502
47.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
47.7k
    return Status::OK();
504
47.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
9.58k
                                                            LocalSinkStateInfo& info) {
500
9.58k
    auto local_state = LocalStateType::create_unique(this, state);
501
9.58k
    RETURN_IF_ERROR(local_state->init(state, info));
502
9.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
9.58k
    return Status::OK();
504
9.58k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
5.17k
                                                            LocalSinkStateInfo& info) {
500
5.17k
    auto local_state = LocalStateType::create_unique(this, state);
501
5.17k
    RETURN_IF_ERROR(local_state->init(state, info));
502
5.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
5.17k
    return Status::OK();
504
5.17k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
156
                                                            LocalSinkStateInfo& info) {
500
156
    auto local_state = LocalStateType::create_unique(this, state);
501
156
    RETURN_IF_ERROR(local_state->init(state, info));
502
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
156
    return Status::OK();
504
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3.99k
                                                            LocalSinkStateInfo& info) {
500
3.99k
    auto local_state = LocalStateType::create_unique(this, state);
501
3.99k
    RETURN_IF_ERROR(local_state->init(state, info));
502
3.99k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3.99k
    return Status::OK();
504
3.99k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
48
                                                            LocalSinkStateInfo& info) {
500
48
    auto local_state = LocalStateType::create_unique(this, state);
501
48
    RETURN_IF_ERROR(local_state->init(state, info));
502
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
48
    return Status::OK();
504
48
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
704
                                                            LocalSinkStateInfo& info) {
500
704
    auto local_state = LocalStateType::create_unique(this, state);
501
704
    RETURN_IF_ERROR(local_state->init(state, info));
502
704
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
704
    return Status::OK();
504
704
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1.68k
                                                            LocalSinkStateInfo& info) {
500
1.68k
    auto local_state = LocalStateType::create_unique(this, state);
501
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
502
1.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1.68k
    return Status::OK();
504
1.68k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
9.15k
                                                            LocalSinkStateInfo& info) {
500
9.15k
    auto local_state = LocalStateType::create_unique(this, state);
501
9.15k
    RETURN_IF_ERROR(local_state->init(state, info));
502
9.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
9.15k
    return Status::OK();
504
9.15k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
98
                                                            LocalSinkStateInfo& info) {
500
98
    auto local_state = LocalStateType::create_unique(this, state);
501
98
    RETURN_IF_ERROR(local_state->init(state, info));
502
98
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
98
    return Status::OK();
504
98
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
282k
                                                            LocalSinkStateInfo& info) {
500
282k
    auto local_state = LocalStateType::create_unique(this, state);
501
282k
    RETURN_IF_ERROR(local_state->init(state, info));
502
282k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
282k
    return Status::OK();
504
282k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
32
                                                            LocalSinkStateInfo& info) {
500
32
    auto local_state = LocalStateType::create_unique(this, state);
501
32
    RETURN_IF_ERROR(local_state->init(state, info));
502
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
32
    return Status::OK();
504
32
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
334k
                                                            LocalSinkStateInfo& info) {
500
334k
    auto local_state = LocalStateType::create_unique(this, state);
501
334k
    RETURN_IF_ERROR(local_state->init(state, info));
502
334k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
334k
    return Status::OK();
504
334k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
161k
                                                            LocalSinkStateInfo& info) {
500
161k
    auto local_state = LocalStateType::create_unique(this, state);
501
161k
    RETURN_IF_ERROR(local_state->init(state, info));
502
161k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
161k
    return Status::OK();
504
161k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
476
                                                            LocalSinkStateInfo& info) {
500
476
    auto local_state = LocalStateType::create_unique(this, state);
501
476
    RETURN_IF_ERROR(local_state->init(state, info));
502
476
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
476
    return Status::OK();
504
476
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
102
                                                            LocalSinkStateInfo& info) {
500
102
    auto local_state = LocalStateType::create_unique(this, state);
501
102
    RETURN_IF_ERROR(local_state->init(state, info));
502
102
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
102
    return Status::OK();
504
102
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
765k
                                                            LocalSinkStateInfo& info) {
500
765k
    auto local_state = LocalStateType::create_unique(this, state);
501
765k
    RETURN_IF_ERROR(local_state->init(state, info));
502
765k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
765k
    return Status::OK();
504
765k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
9.51k
                                                            LocalSinkStateInfo& info) {
500
9.51k
    auto local_state = LocalStateType::create_unique(this, state);
501
9.51k
    RETURN_IF_ERROR(local_state->init(state, info));
502
9.51k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
9.51k
    return Status::OK();
504
9.51k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
6.17k
                                                            LocalSinkStateInfo& info) {
500
6.17k
    auto local_state = LocalStateType::create_unique(this, state);
501
6.17k
    RETURN_IF_ERROR(local_state->init(state, info));
502
6.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
6.17k
    return Status::OK();
504
6.17k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3.86k
                                                            LocalSinkStateInfo& info) {
500
3.86k
    auto local_state = LocalStateType::create_unique(this, state);
501
3.86k
    RETURN_IF_ERROR(local_state->init(state, info));
502
3.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3.86k
    return Status::OK();
504
3.86k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
353
                                                            LocalSinkStateInfo& info) {
500
353
    auto local_state = LocalStateType::create_unique(this, state);
501
353
    RETURN_IF_ERROR(local_state->init(state, info));
502
353
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
353
    return Status::OK();
504
353
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.77k
                                                            LocalSinkStateInfo& info) {
500
4.77k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.77k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.77k
    return Status::OK();
504
4.77k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.60k
                                                            LocalSinkStateInfo& info) {
500
2.60k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.60k
    return Status::OK();
504
2.60k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.56k
                                                            LocalSinkStateInfo& info) {
500
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.56k
    return Status::OK();
504
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.50k
                                                            LocalSinkStateInfo& info) {
500
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.50k
    return Status::OK();
504
2.50k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1
                                                            LocalSinkStateInfo& info) {
500
1
    auto local_state = LocalStateType::create_unique(this, state);
501
1
    RETURN_IF_ERROR(local_state->init(state, info));
502
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1
    return Status::OK();
504
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
564
                                                            LocalSinkStateInfo& info) {
500
564
    auto local_state = LocalStateType::create_unique(this, state);
501
564
    RETURN_IF_ERROR(local_state->init(state, info));
502
564
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
564
    return Status::OK();
504
564
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
14
                                                            LocalSinkStateInfo& info) {
500
14
    auto local_state = LocalStateType::create_unique(this, state);
501
14
    RETURN_IF_ERROR(local_state->init(state, info));
502
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
14
    return Status::OK();
504
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
105
                                                            LocalSinkStateInfo& info) {
500
105
    auto local_state = LocalStateType::create_unique(this, state);
501
105
    RETURN_IF_ERROR(local_state->init(state, info));
502
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
105
    return Status::OK();
504
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
164
                                                            LocalSinkStateInfo& info) {
500
164
    auto local_state = LocalStateType::create_unique(this, state);
501
164
    RETURN_IF_ERROR(local_state->init(state, info));
502
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
164
    return Status::OK();
504
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
164
                                                            LocalSinkStateInfo& info) {
500
164
    auto local_state = LocalStateType::create_unique(this, state);
501
164
    RETURN_IF_ERROR(local_state->init(state, info));
502
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
164
    return Status::OK();
504
164
}
505
506
template <typename LocalStateType>
507
1.90M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
0
                                 LocalExchangeSharedState>) {
510
0
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                        MultiCastSharedState>) {
513
0
        throw Exception(Status::FatalError("should not reach here!"));
514
1.90M
    } else {
515
1.90M
        auto ss = LocalStateType::SharedStateType::create_shared();
516
1.90M
        ss->id = operator_id();
517
1.90M
        for (auto& dest : dests_id()) {
518
1.89M
            ss->related_op_ids.insert(dest);
519
1.89M
        }
520
1.90M
        return ss;
521
1.90M
    }
522
1.90M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
96.9k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
96.9k
    } else {
515
96.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
96.9k
        ss->id = operator_id();
517
96.9k
        for (auto& dest : dests_id()) {
518
96.7k
            ss->related_op_ids.insert(dest);
519
96.7k
        }
520
96.9k
        return ss;
521
96.9k
    }
522
96.9k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
495k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
495k
    } else {
515
495k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
495k
        ss->id = operator_id();
517
495k
        for (auto& dest : dests_id()) {
518
495k
            ss->related_op_ids.insert(dest);
519
495k
        }
520
495k
        return ss;
521
495k
    }
522
495k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
86
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
86
    } else {
515
86
        auto ss = LocalStateType::SharedStateType::create_shared();
516
86
        ss->id = operator_id();
517
86
        for (auto& dest : dests_id()) {
518
86
            ss->related_op_ids.insert(dest);
519
86
        }
520
86
        return ss;
521
86
    }
522
86
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
3
    } else {
515
3
        auto ss = LocalStateType::SharedStateType::create_shared();
516
3
        ss->id = operator_id();
517
3
        for (auto& dest : dests_id()) {
518
3
            ss->related_op_ids.insert(dest);
519
3
        }
520
3
        return ss;
521
3
    }
522
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
515
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
515
    } else {
515
515
        auto ss = LocalStateType::SharedStateType::create_shared();
516
515
        ss->id = operator_id();
517
515
        for (auto& dest : dests_id()) {
518
515
            ss->related_op_ids.insert(dest);
519
515
        }
520
515
        return ss;
521
515
    }
522
515
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
47.8k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
47.8k
    } else {
515
47.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
47.8k
        ss->id = operator_id();
517
47.8k
        for (auto& dest : dests_id()) {
518
47.5k
            ss->related_op_ids.insert(dest);
519
47.5k
        }
520
47.8k
        return ss;
521
47.8k
    }
522
47.8k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
507
9.58k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
9.58k
    } else {
515
9.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
9.58k
        ss->id = operator_id();
517
9.58k
        for (auto& dest : dests_id()) {
518
9.58k
            ss->related_op_ids.insert(dest);
519
9.58k
        }
520
9.58k
        return ss;
521
9.58k
    }
522
9.58k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
5.17k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
5.17k
    } else {
515
5.17k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
5.17k
        ss->id = operator_id();
517
5.17k
        for (auto& dest : dests_id()) {
518
5.17k
            ss->related_op_ids.insert(dest);
519
5.17k
        }
520
5.17k
        return ss;
521
5.17k
    }
522
5.17k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
156
    } else {
515
156
        auto ss = LocalStateType::SharedStateType::create_shared();
516
156
        ss->id = operator_id();
517
156
        for (auto& dest : dests_id()) {
518
156
            ss->related_op_ids.insert(dest);
519
156
        }
520
156
        return ss;
521
156
    }
522
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
3.99k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
3.99k
    } else {
515
3.99k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
3.99k
        ss->id = operator_id();
517
3.99k
        for (auto& dest : dests_id()) {
518
3.99k
            ss->related_op_ids.insert(dest);
519
3.99k
        }
520
3.99k
        return ss;
521
3.99k
    }
522
3.99k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
48
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
48
    } else {
515
48
        auto ss = LocalStateType::SharedStateType::create_shared();
516
48
        ss->id = operator_id();
517
48
        for (auto& dest : dests_id()) {
518
48
            ss->related_op_ids.insert(dest);
519
48
        }
520
48
        return ss;
521
48
    }
522
48
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
704
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
704
    } else {
515
704
        auto ss = LocalStateType::SharedStateType::create_shared();
516
704
        ss->id = operator_id();
517
704
        for (auto& dest : dests_id()) {
518
704
            ss->related_op_ids.insert(dest);
519
704
        }
520
704
        return ss;
521
704
    }
522
704
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
1.68k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
1.68k
    } else {
515
1.68k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
1.68k
        ss->id = operator_id();
517
1.68k
        for (auto& dest : dests_id()) {
518
1.67k
            ss->related_op_ids.insert(dest);
519
1.67k
        }
520
1.68k
        return ss;
521
1.68k
    }
522
1.68k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
9.20k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
9.20k
    } else {
515
9.20k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
9.20k
        ss->id = operator_id();
517
9.22k
        for (auto& dest : dests_id()) {
518
9.22k
            ss->related_op_ids.insert(dest);
519
9.22k
        }
520
9.20k
        return ss;
521
9.20k
    }
522
9.20k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
98
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
98
    } else {
515
98
        auto ss = LocalStateType::SharedStateType::create_shared();
516
98
        ss->id = operator_id();
517
98
        for (auto& dest : dests_id()) {
518
98
            ss->related_op_ids.insert(dest);
519
98
        }
520
98
        return ss;
521
98
    }
522
98
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
283k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
283k
    } else {
515
283k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
283k
        ss->id = operator_id();
517
283k
        for (auto& dest : dests_id()) {
518
283k
            ss->related_op_ids.insert(dest);
519
283k
        }
520
283k
        return ss;
521
283k
    }
522
283k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
34
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
34
    } else {
515
34
        auto ss = LocalStateType::SharedStateType::create_shared();
516
34
        ss->id = operator_id();
517
34
        for (auto& dest : dests_id()) {
518
34
            ss->related_op_ids.insert(dest);
519
34
        }
520
34
        return ss;
521
34
    }
522
34
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
161k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
161k
    } else {
515
161k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
161k
        ss->id = operator_id();
517
161k
        for (auto& dest : dests_id()) {
518
161k
            ss->related_op_ids.insert(dest);
519
161k
        }
520
161k
        return ss;
521
161k
    }
522
161k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
101
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
101
    } else {
515
101
        auto ss = LocalStateType::SharedStateType::create_shared();
516
101
        ss->id = operator_id();
517
101
        for (auto& dest : dests_id()) {
518
101
            ss->related_op_ids.insert(dest);
519
101
        }
520
101
        return ss;
521
101
    }
522
101
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
766k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
766k
    } else {
515
766k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
766k
        ss->id = operator_id();
517
766k
        for (auto& dest : dests_id()) {
518
759k
            ss->related_op_ids.insert(dest);
519
759k
        }
520
766k
        return ss;
521
766k
    }
522
766k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
9.52k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
9.52k
    } else {
515
9.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
9.52k
        ss->id = operator_id();
517
9.52k
        for (auto& dest : dests_id()) {
518
9.51k
            ss->related_op_ids.insert(dest);
519
9.51k
        }
520
9.52k
        return ss;
521
9.52k
    }
522
9.52k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
455
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
455
    } else {
515
455
        auto ss = LocalStateType::SharedStateType::create_shared();
516
455
        ss->id = operator_id();
517
455
        for (auto& dest : dests_id()) {
518
453
            ss->related_op_ids.insert(dest);
519
453
        }
520
455
        return ss;
521
455
    }
522
455
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
507
2.57k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.57k
    } else {
515
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.57k
        ss->id = operator_id();
517
2.57k
        for (auto& dest : dests_id()) {
518
2.57k
            ss->related_op_ids.insert(dest);
519
2.57k
        }
520
2.57k
        return ss;
521
2.57k
    }
522
2.57k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
507
2.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.49k
    } else {
515
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.49k
        ss->id = operator_id();
517
2.49k
        for (auto& dest : dests_id()) {
518
2.48k
            ss->related_op_ids.insert(dest);
519
2.48k
        }
520
2.49k
        return ss;
521
2.49k
    }
522
2.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
566
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
566
    } else {
515
566
        auto ss = LocalStateType::SharedStateType::create_shared();
516
566
        ss->id = operator_id();
517
566
        for (auto& dest : dests_id()) {
518
561
            ss->related_op_ids.insert(dest);
519
561
        }
520
566
        return ss;
521
566
    }
522
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
105
    } else {
515
105
        auto ss = LocalStateType::SharedStateType::create_shared();
516
105
        ss->id = operator_id();
517
105
        for (auto& dest : dests_id()) {
518
105
            ss->related_op_ids.insert(dest);
519
105
        }
520
105
        return ss;
521
105
    }
522
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
523
524
template <typename LocalStateType>
525
2.83M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.83M
    auto local_state = LocalStateType::create_unique(state, this);
527
2.83M
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.83M
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.83M
    return Status::OK();
530
2.83M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
69.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
69.0k
    auto local_state = LocalStateType::create_unique(state, this);
527
69.0k
    RETURN_IF_ERROR(local_state->init(state, info));
528
69.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
69.0k
    return Status::OK();
530
69.0k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
313k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
313k
    auto local_state = LocalStateType::create_unique(state, this);
527
313k
    RETURN_IF_ERROR(local_state->init(state, info));
528
313k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
313k
    return Status::OK();
530
313k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
148
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
148
    auto local_state = LocalStateType::create_unique(state, this);
527
148
    RETURN_IF_ERROR(local_state->init(state, info));
528
148
    state->emplace_local_state(operator_id(), std::move(local_state));
529
148
    return Status::OK();
530
148
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
38.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
38.0k
    auto local_state = LocalStateType::create_unique(state, this);
527
38.0k
    RETURN_IF_ERROR(local_state->init(state, info));
528
38.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
38.0k
    return Status::OK();
530
38.0k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
9.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
9.09k
    auto local_state = LocalStateType::create_unique(state, this);
527
9.09k
    RETURN_IF_ERROR(local_state->init(state, info));
528
9.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
9.09k
    return Status::OK();
530
9.09k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
9.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
9.41k
    auto local_state = LocalStateType::create_unique(state, this);
527
9.41k
    RETURN_IF_ERROR(local_state->init(state, info));
528
9.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
9.41k
    return Status::OK();
530
9.41k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
25
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
25
    auto local_state = LocalStateType::create_unique(state, this);
527
25
    RETURN_IF_ERROR(local_state->init(state, info));
528
25
    state->emplace_local_state(operator_id(), std::move(local_state));
529
25
    return Status::OK();
530
25
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
272k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
272k
    auto local_state = LocalStateType::create_unique(state, this);
527
272k
    RETURN_IF_ERROR(local_state->init(state, info));
528
272k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
272k
    return Status::OK();
530
272k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
161k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
161k
    auto local_state = LocalStateType::create_unique(state, this);
527
161k
    RETURN_IF_ERROR(local_state->init(state, info));
528
161k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
161k
    return Status::OK();
530
161k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
469
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
469
    auto local_state = LocalStateType::create_unique(state, this);
527
469
    RETURN_IF_ERROR(local_state->init(state, info));
528
469
    state->emplace_local_state(operator_id(), std::move(local_state));
529
469
    return Status::OK();
530
469
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
92
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
92
    auto local_state = LocalStateType::create_unique(state, this);
527
92
    RETURN_IF_ERROR(local_state->init(state, info));
528
92
    state->emplace_local_state(operator_id(), std::move(local_state));
529
92
    return Status::OK();
530
92
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
5.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
5.60k
    auto local_state = LocalStateType::create_unique(state, this);
527
5.60k
    RETURN_IF_ERROR(local_state->init(state, info));
528
5.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
5.60k
    return Status::OK();
530
5.60k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
443k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
443k
    auto local_state = LocalStateType::create_unique(state, this);
527
443k
    RETURN_IF_ERROR(local_state->init(state, info));
528
443k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
443k
    return Status::OK();
530
443k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.31k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.31k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.31k
    return Status::OK();
530
1.31k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
9.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
9.50k
    auto local_state = LocalStateType::create_unique(state, this);
527
9.50k
    RETURN_IF_ERROR(local_state->init(state, info));
528
9.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
9.50k
    return Status::OK();
530
9.50k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
221
    auto local_state = LocalStateType::create_unique(state, this);
527
221
    RETURN_IF_ERROR(local_state->init(state, info));
528
221
    state->emplace_local_state(operator_id(), std::move(local_state));
529
221
    return Status::OK();
530
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.98k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.98k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.98k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.98k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.98k
    return Status::OK();
530
1.98k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
56.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
56.3k
    auto local_state = LocalStateType::create_unique(state, this);
527
56.3k
    RETURN_IF_ERROR(local_state->init(state, info));
528
56.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
56.3k
    return Status::OK();
530
56.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
527
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
528
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
10.8k
    return Status::OK();
530
10.8k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
355
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
355
    auto local_state = LocalStateType::create_unique(state, this);
527
355
    RETURN_IF_ERROR(local_state->init(state, info));
528
355
    state->emplace_local_state(operator_id(), std::move(local_state));
529
355
    return Status::OK();
530
355
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.54k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.54k
    return Status::OK();
530
2.54k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.42k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.42k
    return Status::OK();
530
2.42k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
522
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
522
    auto local_state = LocalStateType::create_unique(state, this);
527
522
    RETURN_IF_ERROR(local_state->init(state, info));
528
522
    state->emplace_local_state(operator_id(), std::move(local_state));
529
522
    return Status::OK();
530
522
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.22k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.22k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.22k
    return Status::OK();
530
2.22k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
6.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
6.71k
    auto local_state = LocalStateType::create_unique(state, this);
527
6.71k
    RETURN_IF_ERROR(local_state->init(state, info));
528
6.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
6.71k
    return Status::OK();
530
6.71k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
865k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
865k
    auto local_state = LocalStateType::create_unique(state, this);
527
865k
    RETURN_IF_ERROR(local_state->init(state, info));
528
865k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
865k
    return Status::OK();
530
865k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
14
    auto local_state = LocalStateType::create_unique(state, this);
527
14
    RETURN_IF_ERROR(local_state->init(state, info));
528
14
    state->emplace_local_state(operator_id(), std::move(local_state));
529
14
    return Status::OK();
530
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
164
    auto local_state = LocalStateType::create_unique(state, this);
527
164
    RETURN_IF_ERROR(local_state->init(state, info));
528
164
    state->emplace_local_state(operator_id(), std::move(local_state));
529
164
    return Status::OK();
530
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.18k
    return Status::OK();
530
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.74k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.74k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.74k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.74k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.74k
    return Status::OK();
530
1.74k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.85k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.85k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.85k
    return Status::OK();
530
2.85k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
11.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
11.9k
    auto local_state = LocalStateType::create_unique(state, this);
527
11.9k
    RETURN_IF_ERROR(local_state->init(state, info));
528
11.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
11.9k
    return Status::OK();
530
11.9k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
531k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
531k
    auto local_state = LocalStateType::create_unique(state, this);
527
531k
    RETURN_IF_ERROR(local_state->init(state, info));
528
531k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
531k
    return Status::OK();
530
531k
}
531
532
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
533
                                                         RuntimeState* state)
534
2.26M
        : _parent(parent), _state(state) {}
535
536
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
537
2.82M
        : _num_rows_returned(0),
538
2.82M
          _rows_returned_counter(nullptr),
539
2.82M
          _parent(parent),
540
2.82M
          _state(state),
541
2.82M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
542
543
template <typename SharedStateArg>
544
2.83M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
2.83M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
2.83M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
2.83M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
2.83M
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
2.83M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
2.83M
    _operator_profile->add_child(_common_profile.get(), true);
553
2.83M
    _operator_profile->add_child(_custom_profile.get(), true);
554
2.83M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
2.83M
    if constexpr (!is_fake_shared) {
556
1.47M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
881k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
881k
                                    .first.get()
559
881k
                                    ->template cast<SharedStateArg>();
560
561
881k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
881k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
881k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
881k
        } else if (info.shared_state) {
565
521k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
521k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
521k
            _dependency = _shared_state->create_source_dependency(
572
521k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
521k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
521k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
521k
        } else {
576
74.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
9.32k
                DCHECK(false);
578
9.32k
            }
579
74.3k
        }
580
1.47M
    }
581
582
2.83M
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
2.83M
    _rows_returned_counter =
587
2.83M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
2.83M
    _blocks_returned_counter =
589
2.83M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
2.83M
    _output_block_bytes_counter =
591
2.83M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
2.83M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
2.83M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
2.83M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
2.83M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.83M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
2.83M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
2.83M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
2.83M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
2.83M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
2.83M
    _memory_used_counter =
602
2.83M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
2.83M
    _common_profile->add_info_string("IsColocate",
604
2.83M
                                     std::to_string(_parent->is_colocated_operator()));
605
2.83M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
2.83M
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
2.83M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
2.83M
    return Status::OK();
609
2.83M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
69.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
69.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
69.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
69.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
69.2k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
69.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
69.2k
    _operator_profile->add_child(_common_profile.get(), true);
553
69.2k
    _operator_profile->add_child(_custom_profile.get(), true);
554
69.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
69.2k
    if constexpr (!is_fake_shared) {
556
69.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
20.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
20.0k
                                    .first.get()
559
20.0k
                                    ->template cast<SharedStateArg>();
560
561
20.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
20.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
20.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
49.1k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
48.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
48.4k
            _dependency = _shared_state->create_source_dependency(
572
48.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
48.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
48.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
48.4k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
759
        }
580
69.2k
    }
581
582
69.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
69.2k
    _rows_returned_counter =
587
69.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
69.2k
    _blocks_returned_counter =
589
69.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
69.2k
    _output_block_bytes_counter =
591
69.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
69.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
69.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
69.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
69.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
69.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
69.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
69.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
69.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
69.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
69.2k
    _memory_used_counter =
602
69.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
69.2k
    _common_profile->add_info_string("IsColocate",
604
69.2k
                                     std::to_string(_parent->is_colocated_operator()));
605
69.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
69.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
69.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
69.2k
    return Status::OK();
609
69.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1
    _operator_profile->add_child(_common_profile.get(), true);
553
1
    _operator_profile->add_child(_custom_profile.get(), true);
554
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
1
    if constexpr (!is_fake_shared) {
556
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
1
            _dependency = _shared_state->create_source_dependency(
572
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
1
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
1
    }
581
582
1
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1
    _rows_returned_counter =
587
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1
    _blocks_returned_counter =
589
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1
    _output_block_bytes_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1
    _memory_used_counter =
602
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1
    _common_profile->add_info_string("IsColocate",
604
1
                                     std::to_string(_parent->is_colocated_operator()));
605
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1
    return Status::OK();
609
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
283k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
283k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
283k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
283k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
283k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
283k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
283k
    _operator_profile->add_child(_common_profile.get(), true);
553
283k
    _operator_profile->add_child(_custom_profile.get(), true);
554
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
283k
    if constexpr (!is_fake_shared) {
556
283k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
283k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
275k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
275k
            _dependency = _shared_state->create_source_dependency(
572
275k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
275k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
275k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
275k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
8.51k
        }
580
283k
    }
581
582
283k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
283k
    _rows_returned_counter =
587
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
283k
    _blocks_returned_counter =
589
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
283k
    _output_block_bytes_counter =
591
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
283k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
283k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
283k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
283k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
283k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
283k
    _memory_used_counter =
602
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
283k
    _common_profile->add_info_string("IsColocate",
604
283k
                                     std::to_string(_parent->is_colocated_operator()));
605
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
283k
    return Status::OK();
609
283k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
25
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
25
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
25
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
25
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
25
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
25
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
25
    _operator_profile->add_child(_common_profile.get(), true);
553
25
    _operator_profile->add_child(_custom_profile.get(), true);
554
25
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
25
    if constexpr (!is_fake_shared) {
556
25
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
25
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
25
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
25
            _dependency = _shared_state->create_source_dependency(
572
25
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
25
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
25
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
25
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
25
    }
581
582
25
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
25
    _rows_returned_counter =
587
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
25
    _blocks_returned_counter =
589
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
25
    _output_block_bytes_counter =
591
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
25
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
25
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
25
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
25
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
25
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
25
    _memory_used_counter =
602
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
25
    _common_profile->add_info_string("IsColocate",
604
25
                                     std::to_string(_parent->is_colocated_operator()));
605
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
25
    return Status::OK();
609
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
9.51k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
9.51k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
9.51k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
9.51k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
9.51k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
9.51k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
9.51k
    _operator_profile->add_child(_common_profile.get(), true);
553
9.51k
    _operator_profile->add_child(_custom_profile.get(), true);
554
9.51k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
9.51k
    if constexpr (!is_fake_shared) {
556
9.51k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
9.51k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
9.48k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
9.48k
            _dependency = _shared_state->create_source_dependency(
572
9.48k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
9.48k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
9.48k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
9.48k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
34
        }
580
9.51k
    }
581
582
9.51k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
9.51k
    _rows_returned_counter =
587
9.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
9.51k
    _blocks_returned_counter =
589
9.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
9.51k
    _output_block_bytes_counter =
591
9.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
9.51k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
9.51k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
9.51k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
9.51k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.51k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
9.51k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
9.51k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
9.51k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
9.51k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
9.51k
    _memory_used_counter =
602
9.51k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
9.51k
    _common_profile->add_info_string("IsColocate",
604
9.51k
                                     std::to_string(_parent->is_colocated_operator()));
605
9.51k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
9.51k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
9.51k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
9.51k
    return Status::OK();
609
9.51k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
9.22k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
9.22k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
9.22k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
9.22k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
9.22k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
9.22k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
9.22k
    _operator_profile->add_child(_common_profile.get(), true);
553
9.22k
    _operator_profile->add_child(_custom_profile.get(), true);
554
9.22k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
9.22k
    if constexpr (!is_fake_shared) {
556
9.22k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
9.22k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
9.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
9.05k
            _dependency = _shared_state->create_source_dependency(
572
9.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
9.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
9.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
9.05k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
163
        }
580
9.22k
    }
581
582
9.22k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
9.22k
    _rows_returned_counter =
587
9.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
9.22k
    _blocks_returned_counter =
589
9.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
9.22k
    _output_block_bytes_counter =
591
9.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
9.22k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
9.22k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
9.22k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
9.22k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.22k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
9.22k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
9.22k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
9.22k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
9.22k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
9.22k
    _memory_used_counter =
602
9.22k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
9.22k
    _common_profile->add_info_string("IsColocate",
604
9.22k
                                     std::to_string(_parent->is_colocated_operator()));
605
9.22k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
9.22k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
9.22k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
9.22k
    return Status::OK();
609
9.22k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
161k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
161k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
161k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
161k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
161k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
161k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
161k
    _operator_profile->add_child(_common_profile.get(), true);
553
161k
    _operator_profile->add_child(_custom_profile.get(), true);
554
161k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
161k
    if constexpr (!is_fake_shared) {
556
161k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
161k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
160k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
160k
            _dependency = _shared_state->create_source_dependency(
572
160k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
160k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
160k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
160k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
1.56k
        }
580
161k
    }
581
582
161k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
161k
    _rows_returned_counter =
587
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
161k
    _blocks_returned_counter =
589
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
161k
    _output_block_bytes_counter =
591
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
161k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
161k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
161k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
161k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
161k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
161k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
161k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
161k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
161k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
161k
    _memory_used_counter =
602
161k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
161k
    _common_profile->add_info_string("IsColocate",
604
161k
                                     std::to_string(_parent->is_colocated_operator()));
605
161k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
161k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
161k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
161k
    return Status::OK();
609
161k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
480
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
480
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
480
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
480
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
480
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
480
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
480
    _operator_profile->add_child(_common_profile.get(), true);
553
480
    _operator_profile->add_child(_custom_profile.get(), true);
554
480
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
480
    if constexpr (!is_fake_shared) {
556
480
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
459
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
459
                                    .first.get()
559
459
                                    ->template cast<SharedStateArg>();
560
561
459
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
459
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
459
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
459
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
21
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
21
        }
580
480
    }
581
582
480
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
480
    _rows_returned_counter =
587
480
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
480
    _blocks_returned_counter =
589
480
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
480
    _output_block_bytes_counter =
591
480
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
480
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
480
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
480
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
480
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
480
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
480
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
480
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
480
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
480
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
480
    _memory_used_counter =
602
480
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
480
    _common_profile->add_info_string("IsColocate",
604
480
                                     std::to_string(_parent->is_colocated_operator()));
605
480
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
480
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
480
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
480
    return Status::OK();
609
480
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
92
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
92
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
92
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
92
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
92
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
92
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
92
    _operator_profile->add_child(_common_profile.get(), true);
553
92
    _operator_profile->add_child(_custom_profile.get(), true);
554
92
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
92
    if constexpr (!is_fake_shared) {
556
92
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
92
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
92
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
92
            _dependency = _shared_state->create_source_dependency(
572
92
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
92
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
92
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
92
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
92
    }
581
582
92
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
92
    _rows_returned_counter =
587
92
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
92
    _blocks_returned_counter =
589
92
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
92
    _output_block_bytes_counter =
591
92
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
92
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
92
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
92
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
92
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
92
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
92
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
92
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
92
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
92
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
92
    _memory_used_counter =
602
92
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
92
    _common_profile->add_info_string("IsColocate",
604
92
                                     std::to_string(_parent->is_colocated_operator()));
605
92
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
92
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
92
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
92
    return Status::OK();
609
92
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1.36M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1.36M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1.36M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1.36M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1.36M
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1.36M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1.36M
    _operator_profile->add_child(_common_profile.get(), true);
553
1.36M
    _operator_profile->add_child(_custom_profile.get(), true);
554
1.36M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
    if constexpr (!is_fake_shared) {
556
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
                                    .first.get()
559
                                    ->template cast<SharedStateArg>();
560
561
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
            _dependency = _shared_state->create_source_dependency(
572
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
        }
580
    }
581
582
1.36M
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1.36M
    _rows_returned_counter =
587
1.36M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1.36M
    _blocks_returned_counter =
589
1.36M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1.36M
    _output_block_bytes_counter =
591
1.36M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1.36M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1.36M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1.36M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1.36M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.36M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1.36M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1.36M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1.36M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1.36M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1.36M
    _memory_used_counter =
602
1.36M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1.36M
    _common_profile->add_info_string("IsColocate",
604
1.36M
                                     std::to_string(_parent->is_colocated_operator()));
605
1.36M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1.36M
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1.36M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1.36M
    return Status::OK();
609
1.36M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
56.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
56.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
56.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
56.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
56.2k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
56.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
56.2k
    _operator_profile->add_child(_common_profile.get(), true);
553
56.2k
    _operator_profile->add_child(_custom_profile.get(), true);
554
56.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
56.2k
    if constexpr (!is_fake_shared) {
556
56.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
56.2k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
2.84k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
2.84k
            _dependency = _shared_state->create_source_dependency(
572
2.84k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
2.84k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
2.84k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
53.3k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
53.3k
        }
580
56.2k
    }
581
582
56.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
56.2k
    _rows_returned_counter =
587
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
56.2k
    _blocks_returned_counter =
589
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
56.2k
    _output_block_bytes_counter =
591
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
56.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
56.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
56.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
56.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
56.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
56.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
56.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
56.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
56.2k
    _memory_used_counter =
602
56.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
56.2k
    _common_profile->add_info_string("IsColocate",
604
56.2k
                                     std::to_string(_parent->is_colocated_operator()));
605
56.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
56.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
56.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
56.2k
    return Status::OK();
609
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
26
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
26
    _operator_profile->add_child(_common_profile.get(), true);
553
26
    _operator_profile->add_child(_custom_profile.get(), true);
554
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
26
    if constexpr (!is_fake_shared) {
556
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
26
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
26
            _dependency = _shared_state->create_source_dependency(
572
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
26
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
26
    }
581
582
26
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
26
    _rows_returned_counter =
587
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
26
    _blocks_returned_counter =
589
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
26
    _output_block_bytes_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
26
    _memory_used_counter =
602
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
26
    _common_profile->add_info_string("IsColocate",
604
26
                                     std::to_string(_parent->is_colocated_operator()));
605
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
26
    return Status::OK();
609
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
10.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
10.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
10.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
10.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
10.8k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
10.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
10.8k
    _operator_profile->add_child(_common_profile.get(), true);
553
10.8k
    _operator_profile->add_child(_custom_profile.get(), true);
554
10.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
10.8k
    if constexpr (!is_fake_shared) {
556
10.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
10.8k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
10.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
10.8k
            _dependency = _shared_state->create_source_dependency(
572
10.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
10.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
10.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
10.8k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
69
        }
580
10.8k
    }
581
582
10.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
10.8k
    _rows_returned_counter =
587
10.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
10.8k
    _blocks_returned_counter =
589
10.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
10.8k
    _output_block_bytes_counter =
591
10.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
10.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
10.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
10.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
10.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
10.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
10.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
10.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
10.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
10.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
10.8k
    _memory_used_counter =
602
10.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
10.8k
    _common_profile->add_info_string("IsColocate",
604
10.8k
                                     std::to_string(_parent->is_colocated_operator()));
605
10.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
10.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
10.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
10.8k
    return Status::OK();
609
10.8k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
457
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
457
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
457
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
457
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
457
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
457
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
457
    _operator_profile->add_child(_common_profile.get(), true);
553
457
    _operator_profile->add_child(_custom_profile.get(), true);
554
457
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
457
    if constexpr (!is_fake_shared) {
556
457
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
457
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
456
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
456
            _dependency = _shared_state->create_source_dependency(
572
456
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
456
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
456
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
456
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
1
        }
580
457
    }
581
582
457
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
457
    _rows_returned_counter =
587
457
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
457
    _blocks_returned_counter =
589
457
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
457
    _output_block_bytes_counter =
591
457
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
457
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
457
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
457
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
457
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
457
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
457
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
457
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
457
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
457
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
457
    _memory_used_counter =
602
457
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
457
    _common_profile->add_info_string("IsColocate",
604
457
                                     std::to_string(_parent->is_colocated_operator()));
605
457
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
457
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
457
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
457
    return Status::OK();
609
457
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
4.99k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
4.99k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
4.99k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
4.99k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
4.99k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
4.99k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
4.99k
    _operator_profile->add_child(_common_profile.get(), true);
553
4.99k
    _operator_profile->add_child(_custom_profile.get(), true);
554
4.99k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
4.99k
    if constexpr (!is_fake_shared) {
556
4.99k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
4.99k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
4.50k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
4.50k
            _dependency = _shared_state->create_source_dependency(
572
4.50k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
4.50k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
4.50k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
4.50k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
486
        }
580
4.99k
    }
581
582
4.99k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
4.99k
    _rows_returned_counter =
587
4.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
4.99k
    _blocks_returned_counter =
589
4.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
4.99k
    _output_block_bytes_counter =
591
4.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
4.99k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
4.99k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
4.99k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
4.99k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.99k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
4.99k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
4.99k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
4.99k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
4.99k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
4.99k
    _memory_used_counter =
602
4.99k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
4.99k
    _common_profile->add_info_string("IsColocate",
604
4.99k
                                     std::to_string(_parent->is_colocated_operator()));
605
4.99k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
4.99k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
4.99k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
4.99k
    return Status::OK();
609
4.99k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
870k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
870k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
870k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
870k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
870k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
870k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
870k
    _operator_profile->add_child(_common_profile.get(), true);
553
870k
    _operator_profile->add_child(_custom_profile.get(), true);
554
870k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
870k
    if constexpr (!is_fake_shared) {
556
870k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
861k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
861k
                                    .first.get()
559
861k
                                    ->template cast<SharedStateArg>();
560
561
861k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
861k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
861k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
861k
        } else if (info.shared_state) {
565
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
9.32k
        } else {
576
9.32k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
9.32k
                DCHECK(false);
578
9.32k
            }
579
9.32k
        }
580
870k
    }
581
582
870k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
870k
    _rows_returned_counter =
587
870k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
870k
    _blocks_returned_counter =
589
870k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
870k
    _output_block_bytes_counter =
591
870k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
870k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
870k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
870k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
870k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
870k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
870k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
870k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
870k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
870k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
870k
    _memory_used_counter =
602
870k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
870k
    _common_profile->add_info_string("IsColocate",
604
870k
                                     std::to_string(_parent->is_colocated_operator()));
605
870k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
870k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
870k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
870k
    return Status::OK();
609
870k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
164
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
164
    _operator_profile->add_child(_common_profile.get(), true);
553
164
    _operator_profile->add_child(_custom_profile.get(), true);
554
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
164
    if constexpr (!is_fake_shared) {
556
164
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
164
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
164
            _dependency = _shared_state->create_source_dependency(
572
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
164
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
164
    }
581
582
164
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
164
    _rows_returned_counter =
587
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
164
    _blocks_returned_counter =
589
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
164
    _output_block_bytes_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
164
    _memory_used_counter =
602
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
164
    _common_profile->add_info_string("IsColocate",
604
164
                                     std::to_string(_parent->is_colocated_operator()));
605
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
164
    return Status::OK();
609
164
}
610
611
template <typename SharedStateArg>
612
2.85M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
2.85M
    _conjuncts.resize(_parent->_conjuncts.size());
614
2.85M
    _projections.resize(_parent->_projections.size());
615
3.38M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
536k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
536k
    }
618
5.67M
    for (size_t i = 0; i < _projections.size(); i++) {
619
2.82M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
2.82M
    }
621
2.85M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
2.86M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
13.5k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
102k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
88.8k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
88.8k
                    state, _intermediate_projections[i][j]));
627
88.8k
        }
628
13.5k
    }
629
2.85M
    return Status::OK();
630
2.85M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
69.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
69.3k
    _conjuncts.resize(_parent->_conjuncts.size());
614
69.3k
    _projections.resize(_parent->_projections.size());
615
70.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
721
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
721
    }
618
343k
    for (size_t i = 0; i < _projections.size(); i++) {
619
274k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
274k
    }
621
69.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
72.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
3.04k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
39.4k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
36.3k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
36.3k
                    state, _intermediate_projections[i][j]));
627
36.3k
        }
628
3.04k
    }
629
69.3k
    return Status::OK();
630
69.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
3
    _conjuncts.resize(_parent->_conjuncts.size());
614
3
    _projections.resize(_parent->_projections.size());
615
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
3
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
284k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
284k
    _conjuncts.resize(_parent->_conjuncts.size());
614
284k
    _projections.resize(_parent->_projections.size());
615
284k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
285k
    for (size_t i = 0; i < _projections.size(); i++) {
619
361
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
361
    }
621
284k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
284k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
284k
    return Status::OK();
630
284k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
25
    _conjuncts.resize(_parent->_conjuncts.size());
614
25
    _projections.resize(_parent->_projections.size());
615
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
25
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
25
    return Status::OK();
630
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
9.51k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
9.51k
    _conjuncts.resize(_parent->_conjuncts.size());
614
9.51k
    _projections.resize(_parent->_projections.size());
615
9.57k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
61
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
61
    }
618
61.8k
    for (size_t i = 0; i < _projections.size(); i++) {
619
52.3k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
52.3k
    }
621
9.51k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
9.66k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
147
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
943
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
796
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
796
                    state, _intermediate_projections[i][j]));
627
796
        }
628
147
    }
629
9.51k
    return Status::OK();
630
9.51k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
9.25k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
9.25k
    _conjuncts.resize(_parent->_conjuncts.size());
614
9.25k
    _projections.resize(_parent->_projections.size());
615
10.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
1.20k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
1.20k
    }
618
25.0k
    for (size_t i = 0; i < _projections.size(); i++) {
619
15.8k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
15.8k
    }
621
9.25k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
9.34k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
87
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
670
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
583
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
583
                    state, _intermediate_projections[i][j]));
627
583
        }
628
87
    }
629
9.25k
    return Status::OK();
630
9.25k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
161k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
161k
    _conjuncts.resize(_parent->_conjuncts.size());
614
161k
    _projections.resize(_parent->_projections.size());
615
165k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
3.99k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
3.99k
    }
618
429k
    for (size_t i = 0; i < _projections.size(); i++) {
619
267k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
267k
    }
621
161k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
162k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
278
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
1.89k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
1.61k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
1.61k
                    state, _intermediate_projections[i][j]));
627
1.61k
        }
628
278
    }
629
161k
    return Status::OK();
630
161k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
482
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
482
    _conjuncts.resize(_parent->_conjuncts.size());
614
482
    _projections.resize(_parent->_projections.size());
615
498
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
16
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
16
    }
618
1.59k
    for (size_t i = 0; i < _projections.size(); i++) {
619
1.11k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
1.11k
    }
621
482
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
482
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
482
    return Status::OK();
630
482
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
96
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
96
    _conjuncts.resize(_parent->_conjuncts.size());
614
96
    _projections.resize(_parent->_projections.size());
615
96
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
236
    for (size_t i = 0; i < _projections.size(); i++) {
619
140
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
140
    }
621
96
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
96
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
96
    return Status::OK();
630
96
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
1.37M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
1.37M
    _conjuncts.resize(_parent->_conjuncts.size());
614
1.37M
    _projections.resize(_parent->_projections.size());
615
1.89M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
527k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
527k
    }
618
3.48M
    for (size_t i = 0; i < _projections.size(); i++) {
619
2.11M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
2.11M
    }
621
1.37M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
1.38M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
9.98k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
59.3k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
49.4k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
49.4k
                    state, _intermediate_projections[i][j]));
627
49.4k
        }
628
9.98k
    }
629
1.37M
    return Status::OK();
630
1.37M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
56.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
56.4k
    _conjuncts.resize(_parent->_conjuncts.size());
614
56.4k
    _projections.resize(_parent->_projections.size());
615
56.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
152k
    for (size_t i = 0; i < _projections.size(); i++) {
619
95.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
95.9k
    }
621
56.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
56.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
56.4k
    return Status::OK();
630
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
25
    _conjuncts.resize(_parent->_conjuncts.size());
614
25
    _projections.resize(_parent->_projections.size());
615
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
25
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
25
    return Status::OK();
630
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
10.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
10.8k
    _conjuncts.resize(_parent->_conjuncts.size());
614
10.8k
    _projections.resize(_parent->_projections.size());
615
14.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
3.70k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
3.70k
    }
618
10.8k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
10.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
10.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
10.8k
    return Status::OK();
630
10.8k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
457
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
457
    _conjuncts.resize(_parent->_conjuncts.size());
614
457
    _projections.resize(_parent->_projections.size());
615
457
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
457
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
457
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
457
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
457
    return Status::OK();
630
457
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
5.21k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
5.21k
    _conjuncts.resize(_parent->_conjuncts.size());
614
5.21k
    _projections.resize(_parent->_projections.size());
615
5.21k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
5.38k
    for (size_t i = 0; i < _projections.size(); i++) {
619
168
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
168
    }
621
5.21k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
5.21k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
5.21k
    return Status::OK();
630
5.21k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
873k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
873k
    _conjuncts.resize(_parent->_conjuncts.size());
614
873k
    _projections.resize(_parent->_projections.size());
615
873k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
873k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
873k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
873k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
873k
    return Status::OK();
630
873k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
164
    _conjuncts.resize(_parent->_conjuncts.size());
614
164
    _projections.resize(_parent->_projections.size());
615
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
7
    }
618
483
    for (size_t i = 0; i < _projections.size(); i++) {
619
319
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
319
    }
621
164
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
167
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
3
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
11
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
8
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
8
                    state, _intermediate_projections[i][j]));
627
8
        }
628
3
    }
629
164
    return Status::OK();
630
164
}
631
632
template <typename SharedStateArg>
633
6.85k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
6.85k
    if (_terminated) {
635
2
        return Status::OK();
636
2
    }
637
6.85k
    _terminated = true;
638
6.85k
    return Status::OK();
639
6.85k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
366
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
366
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
366
    _terminated = true;
638
366
    return Status::OK();
639
366
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
54
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
54
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
54
    _terminated = true;
638
54
    return Status::OK();
639
54
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
69
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
69
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
69
    _terminated = true;
638
69
    return Status::OK();
639
69
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
165
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
165
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
165
    _terminated = true;
638
165
    return Status::OK();
639
165
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
5.00k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
5.00k
    if (_terminated) {
635
1
        return Status::OK();
636
1
    }
637
5.00k
    _terminated = true;
638
5.00k
    return Status::OK();
639
5.00k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1
    _terminated = true;
638
1
    return Status::OK();
639
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
2
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
2
    _terminated = true;
638
2
    return Status::OK();
639
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
417
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
417
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
417
    _terminated = true;
638
417
    return Status::OK();
639
417
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
771
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
771
    if (_terminated) {
635
1
        return Status::OK();
636
1
    }
637
770
    _terminated = true;
638
770
    return Status::OK();
639
771
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
11
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
11
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
11
    _terminated = true;
638
11
    return Status::OK();
639
11
}
640
641
template <typename SharedStateArg>
642
3.17M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
3.17M
    if (_closed) {
644
320k
        return Status::OK();
645
320k
    }
646
2.85M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
1.48M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
1.48M
    }
649
2.85M
    _closed = true;
650
2.85M
    return Status::OK();
651
3.17M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
69.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
69.3k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
69.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
69.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
69.3k
    }
649
69.3k
    _closed = true;
650
69.3k
    return Status::OK();
651
69.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
4
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
4
    }
649
4
    _closed = true;
650
4
    return Status::OK();
651
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
565k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
565k
    if (_closed) {
644
283k
        return Status::OK();
645
283k
    }
646
282k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
282k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
282k
    }
649
282k
    _closed = true;
650
282k
    return Status::OK();
651
565k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
25
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
25
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
25
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
25
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
25
    }
649
25
    _closed = true;
650
25
    return Status::OK();
651
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
9.51k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
9.51k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
9.51k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
9.51k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
9.51k
    }
649
9.51k
    _closed = true;
650
9.51k
    return Status::OK();
651
9.51k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
18.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
18.6k
    if (_closed) {
644
9.44k
        return Status::OK();
645
9.44k
    }
646
9.22k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
9.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
9.22k
    }
649
9.22k
    _closed = true;
650
9.22k
    return Status::OK();
651
18.6k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
161k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
161k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
161k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
161k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
161k
    }
649
161k
    _closed = true;
650
161k
    return Status::OK();
651
161k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
478
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
478
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
478
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
478
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
478
    }
649
478
    _closed = true;
650
478
    return Status::OK();
651
478
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
91
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
91
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
91
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
91
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
91
    }
649
91
    _closed = true;
650
91
    return Status::OK();
651
91
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
1.39M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
1.39M
    if (_closed) {
644
21.3k
        return Status::OK();
645
21.3k
    }
646
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
    }
649
1.37M
    _closed = true;
650
1.37M
    return Status::OK();
651
1.39M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
56.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
56.5k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
56.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
56.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
56.5k
    }
649
56.5k
    _closed = true;
650
56.5k
    return Status::OK();
651
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
27
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
27
    if (_closed) {
644
14
        return Status::OK();
645
14
    }
646
13
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
13
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
13
    }
649
13
    _closed = true;
650
13
    return Status::OK();
651
27
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
10.8k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
10.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
10.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
10.8k
    }
649
10.8k
    _closed = true;
650
10.8k
    return Status::OK();
651
10.8k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
708
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
708
    if (_closed) {
644
354
        return Status::OK();
645
354
    }
646
354
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
354
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
354
    }
649
354
    _closed = true;
650
354
    return Status::OK();
651
708
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
10.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
10.7k
    if (_closed) {
644
5.54k
        return Status::OK();
645
5.54k
    }
646
5.20k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
5.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
5.20k
    }
649
5.20k
    _closed = true;
650
5.20k
    return Status::OK();
651
10.7k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
875k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
875k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
875k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
875k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
875k
    }
649
875k
    _closed = true;
650
875k
    return Status::OK();
651
875k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
333
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
333
    if (_closed) {
644
178
        return Status::OK();
645
178
    }
646
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
155
    }
649
155
    _closed = true;
650
155
    return Status::OK();
651
333
}
652
653
template <typename SharedState>
654
2.27M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2.27M
    _operator_profile =
657
2.27M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2.27M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2.27M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2.27M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2.27M
    _operator_profile->add_child(_common_profile, true);
666
2.27M
    _operator_profile->add_child(_custom_profile, true);
667
668
2.27M
    _operator_profile->set_metadata(_parent->node_id());
669
2.27M
    _wait_for_finish_dependency_timer =
670
2.27M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2.27M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2.27M
    if constexpr (!is_fake_shared) {
673
1.50M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
1.50M
            info.shared_state_map.end()) {
675
356k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
335k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
335k
            }
678
356k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
356k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
356k
                                                  ? 0
681
356k
                                                  : info.task_idx]
682
356k
                                  .get();
683
356k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
1.14M
        } else {
685
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
18.4E
                DCHECK(false);
687
18.4E
            }
688
1.14M
            _shared_state = info.shared_state->template cast<SharedState>();
689
1.14M
            _dependency = _shared_state->create_sink_dependency(
690
1.14M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
1.14M
        }
692
1.50M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
1.50M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
1.50M
    }
695
696
2.27M
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2.27M
    _rows_input_counter =
701
2.27M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2.27M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2.27M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2.27M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2.27M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2.27M
    _memory_used_counter =
707
2.27M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2.27M
    _common_profile->add_info_string("IsColocate",
709
2.27M
                                     std::to_string(_parent->is_colocated_operator()));
710
2.27M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2.27M
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2.27M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2.27M
    return Status::OK();
714
2.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
117k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
117k
    _operator_profile =
657
117k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
117k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
117k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
117k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
117k
    _operator_profile->add_child(_common_profile, true);
666
117k
    _operator_profile->add_child(_custom_profile, true);
667
668
117k
    _operator_profile->set_metadata(_parent->node_id());
669
117k
    _wait_for_finish_dependency_timer =
670
117k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
117k
    if constexpr (!is_fake_shared) {
673
117k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
117k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
20.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
20.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
20.3k
                                                  ? 0
681
20.3k
                                                  : info.task_idx]
682
20.3k
                                  .get();
683
20.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
96.8k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
96.8k
            _shared_state = info.shared_state->template cast<SharedState>();
689
96.8k
            _dependency = _shared_state->create_sink_dependency(
690
96.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
96.8k
        }
692
117k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
117k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
117k
    }
695
696
117k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
117k
    _rows_input_counter =
701
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
117k
    _memory_used_counter =
707
117k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
117k
    _common_profile->add_info_string("IsColocate",
709
117k
                                     std::to_string(_parent->is_colocated_operator()));
710
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
117k
    return Status::OK();
714
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2
    _operator_profile =
657
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2
    _operator_profile->add_child(_common_profile, true);
666
2
    _operator_profile->add_child(_custom_profile, true);
667
668
2
    _operator_profile->set_metadata(_parent->node_id());
669
2
    _wait_for_finish_dependency_timer =
670
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2
    if constexpr (!is_fake_shared) {
673
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
2
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2
            _shared_state = info.shared_state->template cast<SharedState>();
689
2
            _dependency = _shared_state->create_sink_dependency(
690
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2
        }
692
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2
    }
695
696
2
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2
    _rows_input_counter =
701
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2
    _memory_used_counter =
707
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2
    _common_profile->add_info_string("IsColocate",
709
2
                                     std::to_string(_parent->is_colocated_operator()));
710
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2
    return Status::OK();
714
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
283k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
283k
    _operator_profile =
657
283k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
283k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
283k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
283k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
283k
    _operator_profile->add_child(_common_profile, true);
666
283k
    _operator_profile->add_child(_custom_profile, true);
667
668
283k
    _operator_profile->set_metadata(_parent->node_id());
669
283k
    _wait_for_finish_dependency_timer =
670
283k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
283k
    if constexpr (!is_fake_shared) {
673
283k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
283k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
283k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
283k
            _shared_state = info.shared_state->template cast<SharedState>();
689
283k
            _dependency = _shared_state->create_sink_dependency(
690
283k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
283k
        }
692
283k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
283k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
283k
    }
695
696
283k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
283k
    _rows_input_counter =
701
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
283k
    _memory_used_counter =
707
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
283k
    _common_profile->add_info_string("IsColocate",
709
283k
                                     std::to_string(_parent->is_colocated_operator()));
710
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
283k
    return Status::OK();
714
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
32
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
32
    _operator_profile =
657
32
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
32
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
32
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
32
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
32
    _operator_profile->add_child(_common_profile, true);
666
32
    _operator_profile->add_child(_custom_profile, true);
667
668
32
    _operator_profile->set_metadata(_parent->node_id());
669
32
    _wait_for_finish_dependency_timer =
670
32
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
32
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
32
    if constexpr (!is_fake_shared) {
673
32
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
32
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
32
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
32
            _shared_state = info.shared_state->template cast<SharedState>();
689
32
            _dependency = _shared_state->create_sink_dependency(
690
32
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
32
        }
692
32
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
32
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
32
    }
695
696
32
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
32
    _rows_input_counter =
701
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
32
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
32
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
32
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
32
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
32
    _memory_used_counter =
707
32
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
32
    _common_profile->add_info_string("IsColocate",
709
32
                                     std::to_string(_parent->is_colocated_operator()));
710
32
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
32
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
32
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
32
    return Status::OK();
714
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
9.51k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
9.51k
    _operator_profile =
657
9.51k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
9.51k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
9.51k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
9.51k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
9.51k
    _operator_profile->add_child(_common_profile, true);
666
9.51k
    _operator_profile->add_child(_custom_profile, true);
667
668
9.51k
    _operator_profile->set_metadata(_parent->node_id());
669
9.51k
    _wait_for_finish_dependency_timer =
670
9.51k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
9.51k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
9.51k
    if constexpr (!is_fake_shared) {
673
9.51k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
9.51k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
9.51k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
9.51k
            _shared_state = info.shared_state->template cast<SharedState>();
689
9.51k
            _dependency = _shared_state->create_sink_dependency(
690
9.51k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
9.51k
        }
692
9.51k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
9.51k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
9.51k
    }
695
696
9.51k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
9.51k
    _rows_input_counter =
701
9.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
9.51k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
9.51k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
9.51k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
9.51k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
9.51k
    _memory_used_counter =
707
9.51k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
9.51k
    _common_profile->add_info_string("IsColocate",
709
9.51k
                                     std::to_string(_parent->is_colocated_operator()));
710
9.51k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
9.51k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
9.51k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
9.51k
    return Status::OK();
714
9.51k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
9.19k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
9.19k
    _operator_profile =
657
9.19k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
9.19k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
9.19k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
9.19k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
9.19k
    _operator_profile->add_child(_common_profile, true);
666
9.19k
    _operator_profile->add_child(_custom_profile, true);
667
668
9.19k
    _operator_profile->set_metadata(_parent->node_id());
669
9.19k
    _wait_for_finish_dependency_timer =
670
9.19k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
9.19k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
9.19k
    if constexpr (!is_fake_shared) {
673
9.19k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
9.19k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
9.19k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
9.19k
            _shared_state = info.shared_state->template cast<SharedState>();
689
9.19k
            _dependency = _shared_state->create_sink_dependency(
690
9.19k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
9.19k
        }
692
9.19k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
9.19k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
9.19k
    }
695
696
9.19k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
9.19k
    _rows_input_counter =
701
9.19k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
9.19k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
9.19k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
9.19k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
9.19k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
9.19k
    _memory_used_counter =
707
9.19k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
9.19k
    _common_profile->add_info_string("IsColocate",
709
9.19k
                                     std::to_string(_parent->is_colocated_operator()));
710
9.19k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
9.19k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
9.19k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
9.19k
    return Status::OK();
714
9.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
161k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
161k
    _operator_profile =
657
161k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
161k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
161k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
161k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
161k
    _operator_profile->add_child(_common_profile, true);
666
161k
    _operator_profile->add_child(_custom_profile, true);
667
668
161k
    _operator_profile->set_metadata(_parent->node_id());
669
161k
    _wait_for_finish_dependency_timer =
670
161k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
161k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
161k
    if constexpr (!is_fake_shared) {
673
161k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
161k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
161k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
161k
            _shared_state = info.shared_state->template cast<SharedState>();
689
161k
            _dependency = _shared_state->create_sink_dependency(
690
161k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
161k
        }
692
161k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
161k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
161k
    }
695
696
161k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
161k
    _rows_input_counter =
701
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
161k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
161k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
161k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
161k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
161k
    _memory_used_counter =
707
161k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
161k
    _common_profile->add_info_string("IsColocate",
709
161k
                                     std::to_string(_parent->is_colocated_operator()));
710
161k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
161k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
161k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
161k
    return Status::OK();
714
161k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
478
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
478
    _operator_profile =
657
478
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
478
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
478
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
478
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
478
    _operator_profile->add_child(_common_profile, true);
666
478
    _operator_profile->add_child(_custom_profile, true);
667
668
478
    _operator_profile->set_metadata(_parent->node_id());
669
478
    _wait_for_finish_dependency_timer =
670
478
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
478
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
478
    if constexpr (!is_fake_shared) {
673
478
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
478
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
476
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
476
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
476
                                                  ? 0
681
476
                                                  : info.task_idx]
682
476
                                  .get();
683
476
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
476
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2
            _shared_state = info.shared_state->template cast<SharedState>();
689
2
            _dependency = _shared_state->create_sink_dependency(
690
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2
        }
692
478
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
478
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
478
    }
695
696
478
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
478
    _rows_input_counter =
701
478
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
478
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
478
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
478
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
478
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
478
    _memory_used_counter =
707
478
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
478
    _common_profile->add_info_string("IsColocate",
709
478
                                     std::to_string(_parent->is_colocated_operator()));
710
478
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
478
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
478
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
478
    return Status::OK();
714
478
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
102
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
102
    _operator_profile =
657
102
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
102
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
102
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
102
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
102
    _operator_profile->add_child(_common_profile, true);
666
102
    _operator_profile->add_child(_custom_profile, true);
667
668
102
    _operator_profile->set_metadata(_parent->node_id());
669
102
    _wait_for_finish_dependency_timer =
670
102
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
102
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
102
    if constexpr (!is_fake_shared) {
673
102
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
102
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
102
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
102
            _shared_state = info.shared_state->template cast<SharedState>();
689
102
            _dependency = _shared_state->create_sink_dependency(
690
102
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
102
        }
692
102
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
102
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
102
    }
695
696
102
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
102
    _rows_input_counter =
701
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
102
    _memory_used_counter =
707
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
102
    _common_profile->add_info_string("IsColocate",
709
102
                                     std::to_string(_parent->is_colocated_operator()));
710
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
102
    return Status::OK();
714
102
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
768k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
768k
    _operator_profile =
657
768k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
768k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
768k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
768k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
768k
    _operator_profile->add_child(_common_profile, true);
666
768k
    _operator_profile->add_child(_custom_profile, true);
667
668
768k
    _operator_profile->set_metadata(_parent->node_id());
669
768k
    _wait_for_finish_dependency_timer =
670
768k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
768k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
    if constexpr (!is_fake_shared) {
673
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
                                                  ? 0
681
                                                  : info.task_idx]
682
                                  .get();
683
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
            _shared_state = info.shared_state->template cast<SharedState>();
689
            _dependency = _shared_state->create_sink_dependency(
690
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
        }
692
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
    }
695
696
768k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
768k
    _rows_input_counter =
701
768k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
768k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
768k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
768k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
768k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
768k
    _memory_used_counter =
707
768k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
768k
    _common_profile->add_info_string("IsColocate",
709
768k
                                     std::to_string(_parent->is_colocated_operator()));
710
768k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
768k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
768k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
768k
    return Status::OK();
714
768k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
6.18k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
6.18k
    _operator_profile =
657
6.18k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
6.18k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
6.18k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
6.18k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
6.18k
    _operator_profile->add_child(_common_profile, true);
666
6.18k
    _operator_profile->add_child(_custom_profile, true);
667
668
6.18k
    _operator_profile->set_metadata(_parent->node_id());
669
6.18k
    _wait_for_finish_dependency_timer =
670
6.18k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
6.18k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
6.18k
    if constexpr (!is_fake_shared) {
673
6.18k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
6.18k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
6.18k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
6.18k
            _shared_state = info.shared_state->template cast<SharedState>();
689
6.18k
            _dependency = _shared_state->create_sink_dependency(
690
6.18k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
6.18k
        }
692
6.18k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
6.18k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
6.18k
    }
695
696
6.18k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
6.18k
    _rows_input_counter =
701
6.18k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
6.18k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
6.18k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
6.18k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
6.18k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
6.18k
    _memory_used_counter =
707
6.18k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
6.18k
    _common_profile->add_info_string("IsColocate",
709
6.18k
                                     std::to_string(_parent->is_colocated_operator()));
710
6.18k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
6.18k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
6.18k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
6.18k
    return Status::OK();
714
6.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
457
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
457
    _operator_profile =
657
457
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
457
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
457
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
457
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
457
    _operator_profile->add_child(_common_profile, true);
666
457
    _operator_profile->add_child(_custom_profile, true);
667
668
457
    _operator_profile->set_metadata(_parent->node_id());
669
457
    _wait_for_finish_dependency_timer =
670
457
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
457
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
457
    if constexpr (!is_fake_shared) {
673
457
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
457
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
457
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
457
            _shared_state = info.shared_state->template cast<SharedState>();
689
457
            _dependency = _shared_state->create_sink_dependency(
690
457
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
457
        }
692
457
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
457
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
457
    }
695
696
457
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
457
    _rows_input_counter =
701
457
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
457
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
457
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
457
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
457
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
457
    _memory_used_counter =
707
457
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
457
    _common_profile->add_info_string("IsColocate",
709
457
                                     std::to_string(_parent->is_colocated_operator()));
710
457
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
457
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
457
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
457
    return Status::OK();
714
457
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
3.85k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
3.85k
    _operator_profile =
657
3.85k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
3.85k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
3.85k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
3.85k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
3.85k
    _operator_profile->add_child(_common_profile, true);
666
3.85k
    _operator_profile->add_child(_custom_profile, true);
667
668
3.85k
    _operator_profile->set_metadata(_parent->node_id());
669
3.85k
    _wait_for_finish_dependency_timer =
670
3.85k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
3.85k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
3.85k
    if constexpr (!is_fake_shared) {
673
3.85k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
3.85k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
3.85k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
3.85k
            _shared_state = info.shared_state->template cast<SharedState>();
689
3.85k
            _dependency = _shared_state->create_sink_dependency(
690
3.85k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
3.85k
        }
692
3.85k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
3.85k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
3.85k
    }
695
696
3.85k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
3.85k
    _rows_input_counter =
701
3.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
3.85k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
3.85k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
3.85k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
3.85k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
3.85k
    _memory_used_counter =
707
3.85k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
3.85k
    _common_profile->add_info_string("IsColocate",
709
3.85k
                                     std::to_string(_parent->is_colocated_operator()));
710
3.85k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
3.85k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
3.85k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
3.85k
    return Status::OK();
714
3.85k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
12.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
12.6k
    _operator_profile =
657
12.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
12.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
12.6k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
12.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
12.6k
    _operator_profile->add_child(_common_profile, true);
666
12.6k
    _operator_profile->add_child(_custom_profile, true);
667
668
12.6k
    _operator_profile->set_metadata(_parent->node_id());
669
12.6k
    _wait_for_finish_dependency_timer =
670
12.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
12.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
12.6k
    if constexpr (!is_fake_shared) {
673
12.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
12.6k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
12.6k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
12.6k
            _shared_state = info.shared_state->template cast<SharedState>();
689
12.6k
            _dependency = _shared_state->create_sink_dependency(
690
12.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
12.6k
        }
692
12.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
12.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
12.6k
    }
695
696
12.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
12.6k
    _rows_input_counter =
701
12.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
12.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
12.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
12.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
12.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
12.6k
    _memory_used_counter =
707
12.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
12.6k
    _common_profile->add_info_string("IsColocate",
709
12.6k
                                     std::to_string(_parent->is_colocated_operator()));
710
12.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
12.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
12.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
12.6k
    return Status::OK();
714
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
335k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
335k
    _operator_profile =
657
335k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
335k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
335k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
335k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
335k
    _operator_profile->add_child(_common_profile, true);
666
335k
    _operator_profile->add_child(_custom_profile, true);
667
668
335k
    _operator_profile->set_metadata(_parent->node_id());
669
335k
    _wait_for_finish_dependency_timer =
670
335k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
335k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
335k
    if constexpr (!is_fake_shared) {
673
335k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
335k
            info.shared_state_map.end()) {
675
335k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
335k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
335k
            }
678
335k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
335k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
335k
                                                  ? 0
681
335k
                                                  : info.task_idx]
682
335k
                                  .get();
683
335k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
18.4E
        } else {
685
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
18.4E
                DCHECK(false);
687
18.4E
            }
688
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
689
18.4E
            _dependency = _shared_state->create_sink_dependency(
690
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
18.4E
        }
692
335k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
335k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
335k
    }
695
696
335k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
335k
    _rows_input_counter =
701
335k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
335k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
335k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
335k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
335k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
335k
    _memory_used_counter =
707
335k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
335k
    _common_profile->add_info_string("IsColocate",
709
335k
                                     std::to_string(_parent->is_colocated_operator()));
710
335k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
335k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
335k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
335k
    return Status::OK();
714
335k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
565k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
565k
    _operator_profile =
657
565k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
565k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
565k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
565k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
565k
    _operator_profile->add_child(_common_profile, true);
666
565k
    _operator_profile->add_child(_custom_profile, true);
667
668
565k
    _operator_profile->set_metadata(_parent->node_id());
669
565k
    _wait_for_finish_dependency_timer =
670
565k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
565k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
565k
    if constexpr (!is_fake_shared) {
673
565k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
565k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
565k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
565k
            _shared_state = info.shared_state->template cast<SharedState>();
689
565k
            _dependency = _shared_state->create_sink_dependency(
690
565k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
565k
        }
692
565k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
565k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
565k
    }
695
696
565k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
565k
    _rows_input_counter =
701
565k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
565k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
565k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
565k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
565k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
565k
    _memory_used_counter =
707
565k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
565k
    _common_profile->add_info_string("IsColocate",
709
565k
                                     std::to_string(_parent->is_colocated_operator()));
710
565k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
565k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
565k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
565k
    return Status::OK();
714
565k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
25
    _operator_profile =
657
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
25
    _operator_profile->add_child(_common_profile, true);
666
25
    _operator_profile->add_child(_custom_profile, true);
667
668
25
    _operator_profile->set_metadata(_parent->node_id());
669
25
    _wait_for_finish_dependency_timer =
670
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
25
    if constexpr (!is_fake_shared) {
673
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
25
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
25
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
25
            _shared_state = info.shared_state->template cast<SharedState>();
689
25
            _dependency = _shared_state->create_sink_dependency(
690
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
25
        }
692
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
25
    }
695
696
25
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
25
    _rows_input_counter =
701
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
25
    _memory_used_counter =
707
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
25
    _common_profile->add_info_string("IsColocate",
709
25
                                     std::to_string(_parent->is_colocated_operator()));
710
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
25
    return Status::OK();
714
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
328
    _operator_profile =
657
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
328
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
328
    _operator_profile->add_child(_common_profile, true);
666
328
    _operator_profile->add_child(_custom_profile, true);
667
668
328
    _operator_profile->set_metadata(_parent->node_id());
669
328
    _wait_for_finish_dependency_timer =
670
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
328
    if constexpr (!is_fake_shared) {
673
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
328
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
328
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
328
            _shared_state = info.shared_state->template cast<SharedState>();
689
328
            _dependency = _shared_state->create_sink_dependency(
690
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
328
        }
692
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
328
    }
695
696
328
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
328
    _rows_input_counter =
701
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
328
    _memory_used_counter =
707
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
328
    _common_profile->add_info_string("IsColocate",
709
328
                                     std::to_string(_parent->is_colocated_operator()));
710
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
328
    return Status::OK();
714
328
}
715
716
template <typename SharedState>
717
2.28M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
2.28M
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
2.28M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1.51M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1.51M
    }
724
2.28M
    _closed = true;
725
2.28M
    return Status::OK();
726
2.28M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
117k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
117k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
117k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
117k
    }
724
117k
    _closed = true;
725
117k
    return Status::OK();
726
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1
    }
724
1
    _closed = true;
725
1
    return Status::OK();
726
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
283k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
283k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
283k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
283k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
283k
    }
724
283k
    _closed = true;
725
283k
    return Status::OK();
726
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
23
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
23
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
21
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
21
    }
724
21
    _closed = true;
725
21
    return Status::OK();
726
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
9.50k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
9.50k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
9.50k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
9.50k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
9.50k
    }
724
9.50k
    _closed = true;
725
9.50k
    return Status::OK();
726
9.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
9.22k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
9.22k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
9.22k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
9.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
9.22k
    }
724
9.22k
    _closed = true;
725
9.22k
    return Status::OK();
726
9.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
161k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
161k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
161k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
161k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
161k
    }
724
161k
    _closed = true;
725
161k
    return Status::OK();
726
161k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
477
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
477
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
477
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
477
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
477
    }
724
477
    _closed = true;
725
477
    return Status::OK();
726
477
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
91
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
91
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
91
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
91
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
91
    }
724
91
    _closed = true;
725
91
    return Status::OK();
726
91
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
773k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
773k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
    }
724
773k
    _closed = true;
725
773k
    return Status::OK();
726
773k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
6.19k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
6.19k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
6.19k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
6.19k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
6.19k
    }
724
6.19k
    _closed = true;
725
6.19k
    return Status::OK();
726
6.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
352
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
352
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
352
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
352
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
352
    }
724
352
    _closed = true;
725
352
    return Status::OK();
726
352
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
3.89k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
3.89k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
3.89k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
3.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
3.89k
    }
724
3.89k
    _closed = true;
725
3.89k
    return Status::OK();
726
3.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
12.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
12.7k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
12.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
12.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
12.7k
    }
724
12.7k
    _closed = true;
725
12.7k
    return Status::OK();
726
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
336k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
336k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
336k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
336k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
336k
    }
724
336k
    _closed = true;
725
336k
    return Status::OK();
726
336k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
569k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
569k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
569k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
569k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
569k
    }
724
569k
    _closed = true;
725
569k
    return Status::OK();
726
569k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
14
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
14
    }
724
14
    _closed = true;
725
14
    return Status::OK();
726
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
328
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
328
    }
724
328
    _closed = true;
725
328
    return Status::OK();
726
328
}
727
728
template <typename LocalStateType>
729
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
730
16.2k
                                                          bool* eos) {
731
16.2k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
16.2k
    return pull(state, block, eos);
733
16.2k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
432
                                                          bool* eos) {
731
432
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
432
    return pull(state, block, eos);
733
432
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
15.8k
                                                          bool* eos) {
731
15.8k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
15.8k
    return pull(state, block, eos);
733
15.8k
}
734
735
template <typename LocalStateType>
736
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
822k
                                                         bool* eos) {
738
822k
    auto& local_state = get_local_state(state);
739
822k
    if (need_more_input_data(state)) {
740
794k
        local_state._child_block->clear_column_data(
741
794k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
794k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
794k
                state, local_state._child_block.get(), &local_state._child_eos));
744
794k
        *eos = local_state._child_eos;
745
794k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
78.7k
            return Status::OK();
747
78.7k
        }
748
715k
        {
749
715k
            SCOPED_TIMER(local_state.exec_time_counter());
750
715k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
715k
        }
752
715k
    }
753
754
743k
    if (!need_more_input_data(state)) {
755
690k
        SCOPED_TIMER(local_state.exec_time_counter());
756
690k
        bool new_eos = false;
757
690k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
690k
        if (new_eos) {
759
608k
            *eos = true;
760
608k
        } else if (!need_more_input_data(state)) {
761
23.6k
            *eos = false;
762
23.6k
        }
763
690k
    }
764
743k
    return Status::OK();
765
743k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
149k
                                                         bool* eos) {
738
149k
    auto& local_state = get_local_state(state);
739
149k
    if (need_more_input_data(state)) {
740
133k
        local_state._child_block->clear_column_data(
741
133k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
133k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
133k
                state, local_state._child_block.get(), &local_state._child_eos));
744
133k
        *eos = local_state._child_eos;
745
133k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
46.8k
            return Status::OK();
747
46.8k
        }
748
86.1k
        {
749
86.1k
            SCOPED_TIMER(local_state.exec_time_counter());
750
86.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
86.1k
        }
752
86.1k
    }
753
754
103k
    if (!need_more_input_data(state)) {
755
103k
        SCOPED_TIMER(local_state.exec_time_counter());
756
103k
        bool new_eos = false;
757
103k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
103k
        if (new_eos) {
759
45.0k
            *eos = true;
760
57.9k
        } else if (!need_more_input_data(state)) {
761
10.6k
            *eos = false;
762
10.6k
        }
763
103k
    }
764
102k
    return Status::OK();
765
102k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.28k
                                                         bool* eos) {
738
4.28k
    auto& local_state = get_local_state(state);
739
4.28k
    if (need_more_input_data(state)) {
740
2.41k
        local_state._child_block->clear_column_data(
741
2.41k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
2.41k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
2.41k
                state, local_state._child_block.get(), &local_state._child_eos));
744
2.41k
        *eos = local_state._child_eos;
745
2.41k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
491
            return Status::OK();
747
491
        }
748
1.92k
        {
749
1.92k
            SCOPED_TIMER(local_state.exec_time_counter());
750
1.92k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
1.92k
        }
752
1.92k
    }
753
754
3.81k
    if (!need_more_input_data(state)) {
755
3.81k
        SCOPED_TIMER(local_state.exec_time_counter());
756
3.81k
        bool new_eos = false;
757
3.81k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
3.81k
        if (new_eos) {
759
1.30k
            *eos = true;
760
2.50k
        } else if (!need_more_input_data(state)) {
761
1.87k
            *eos = false;
762
1.87k
        }
763
3.81k
    }
764
3.79k
    return Status::OK();
765
3.79k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.96k
                                                         bool* eos) {
738
4.96k
    auto& local_state = get_local_state(state);
739
4.96k
    if (need_more_input_data(state)) {
740
4.96k
        local_state._child_block->clear_column_data(
741
4.96k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
4.96k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
4.96k
                state, local_state._child_block.get(), &local_state._child_eos));
744
4.96k
        *eos = local_state._child_eos;
745
4.96k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
1.72k
            return Status::OK();
747
1.72k
        }
748
3.24k
        {
749
3.24k
            SCOPED_TIMER(local_state.exec_time_counter());
750
3.24k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
3.24k
        }
752
3.24k
    }
753
754
3.24k
    if (!need_more_input_data(state)) {
755
3.24k
        SCOPED_TIMER(local_state.exec_time_counter());
756
3.24k
        bool new_eos = false;
757
3.24k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
3.24k
        if (new_eos) {
759
1.74k
            *eos = true;
760
1.74k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
3.24k
    }
764
3.24k
    return Status::OK();
765
3.24k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
35.3k
                                                         bool* eos) {
738
35.3k
    auto& local_state = get_local_state(state);
739
35.3k
    if (need_more_input_data(state)) {
740
35.3k
        local_state._child_block->clear_column_data(
741
35.3k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
35.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
35.3k
                state, local_state._child_block.get(), &local_state._child_eos));
744
35.3k
        *eos = local_state._child_eos;
745
35.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
3.47k
            return Status::OK();
747
3.47k
        }
748
31.8k
        {
749
31.8k
            SCOPED_TIMER(local_state.exec_time_counter());
750
31.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
31.8k
        }
752
31.8k
    }
753
754
31.8k
    if (!need_more_input_data(state)) {
755
11.9k
        SCOPED_TIMER(local_state.exec_time_counter());
756
11.9k
        bool new_eos = false;
757
11.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
11.9k
        if (new_eos) {
759
11.8k
            *eos = true;
760
11.8k
        } else if (!need_more_input_data(state)) {
761
11
            *eos = false;
762
11
        }
763
11.9k
    }
764
31.8k
    return Status::OK();
765
31.8k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
590k
                                                         bool* eos) {
738
590k
    auto& local_state = get_local_state(state);
739
591k
    if (need_more_input_data(state)) {
740
591k
        local_state._child_block->clear_column_data(
741
591k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
591k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
591k
                state, local_state._child_block.get(), &local_state._child_eos));
744
591k
        *eos = local_state._child_eos;
745
591k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
22.5k
            return Status::OK();
747
22.5k
        }
748
568k
        {
749
568k
            SCOPED_TIMER(local_state.exec_time_counter());
750
568k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
568k
        }
752
568k
    }
753
754
567k
    if (!need_more_input_data(state)) {
755
534k
        SCOPED_TIMER(local_state.exec_time_counter());
756
534k
        bool new_eos = false;
757
534k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
534k
        if (new_eos) {
759
533k
            *eos = true;
760
533k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
534k
    }
764
567k
    return Status::OK();
765
567k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
30.0k
                                                         bool* eos) {
738
30.0k
    auto& local_state = get_local_state(state);
739
30.0k
    if (need_more_input_data(state)) {
740
19.2k
        local_state._child_block->clear_column_data(
741
19.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
19.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
19.2k
                state, local_state._child_block.get(), &local_state._child_eos));
744
19.2k
        *eos = local_state._child_eos;
745
19.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
3.30k
            return Status::OK();
747
3.30k
        }
748
15.9k
        {
749
15.9k
            SCOPED_TIMER(local_state.exec_time_counter());
750
15.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
15.9k
        }
752
15.9k
    }
753
754
26.6k
    if (!need_more_input_data(state)) {
755
26.0k
        SCOPED_TIMER(local_state.exec_time_counter());
756
26.0k
        bool new_eos = false;
757
26.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
26.0k
        if (new_eos) {
759
9.48k
            *eos = true;
760
16.5k
        } else if (!need_more_input_data(state)) {
761
10.7k
            *eos = false;
762
10.7k
        }
763
26.0k
    }
764
26.6k
    return Status::OK();
765
26.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
8.21k
                                                         bool* eos) {
738
8.21k
    auto& local_state = get_local_state(state);
739
8.21k
    if (need_more_input_data(state)) {
740
7.85k
        local_state._child_block->clear_column_data(
741
7.85k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
7.85k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
7.85k
                state, local_state._child_block.get(), &local_state._child_eos));
744
7.85k
        *eos = local_state._child_eos;
745
7.85k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
465
            return Status::OK();
747
465
        }
748
7.39k
        {
749
7.39k
            SCOPED_TIMER(local_state.exec_time_counter());
750
7.39k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
7.39k
        }
752
7.39k
    }
753
754
7.74k
    if (!need_more_input_data(state)) {
755
7.74k
        SCOPED_TIMER(local_state.exec_time_counter());
756
7.74k
        bool new_eos = false;
757
7.74k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
7.74k
        if (new_eos) {
759
5.59k
            *eos = true;
760
5.59k
        } else if (!need_more_input_data(state)) {
761
366
            *eos = false;
762
366
        }
763
7.74k
    }
764
7.74k
    return Status::OK();
765
7.74k
}
766
767
template <typename Writer, typename Parent>
768
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
769
69.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
69.4k
    RETURN_IF_ERROR(Base::init(state, info));
771
69.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
69.4k
                                                         "AsyncWriterDependency", true);
773
69.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
69.4k
                             _finish_dependency));
775
776
69.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
69.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
69.4k
    return Status::OK();
779
69.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
515
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
515
    RETURN_IF_ERROR(Base::init(state, info));
771
515
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
515
                                                         "AsyncWriterDependency", true);
773
515
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
515
                             _finish_dependency));
775
776
515
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
515
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
515
    return Status::OK();
779
515
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
86
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
86
    RETURN_IF_ERROR(Base::init(state, info));
771
86
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
86
                                                         "AsyncWriterDependency", true);
773
86
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
86
                             _finish_dependency));
775
776
86
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
86
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
86
    return Status::OK();
779
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
47.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
47.5k
    RETURN_IF_ERROR(Base::init(state, info));
771
47.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
47.5k
                                                         "AsyncWriterDependency", true);
773
47.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
47.5k
                             _finish_dependency));
775
776
47.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
47.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
47.5k
    return Status::OK();
779
47.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
9.58k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
9.58k
    RETURN_IF_ERROR(Base::init(state, info));
771
9.58k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
9.58k
                                                         "AsyncWriterDependency", true);
773
9.58k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
9.58k
                             _finish_dependency));
775
776
9.58k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
9.58k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
9.58k
    return Status::OK();
779
9.58k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
5.17k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
5.17k
    RETURN_IF_ERROR(Base::init(state, info));
771
5.17k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
5.17k
                                                         "AsyncWriterDependency", true);
773
5.17k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
5.17k
                             _finish_dependency));
775
776
5.17k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
5.17k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
5.17k
    return Status::OK();
779
5.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
4.00k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
4.00k
    RETURN_IF_ERROR(Base::init(state, info));
771
4.00k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
4.00k
                                                         "AsyncWriterDependency", true);
773
4.00k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
4.00k
                             _finish_dependency));
775
776
4.00k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
4.00k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
4.00k
    return Status::OK();
779
4.00k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
48
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
48
    RETURN_IF_ERROR(Base::init(state, info));
771
48
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
48
                                                         "AsyncWriterDependency", true);
773
48
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
48
                             _finish_dependency));
775
776
48
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
48
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
48
    return Status::OK();
779
48
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
704
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
704
    RETURN_IF_ERROR(Base::init(state, info));
771
704
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
704
                                                         "AsyncWriterDependency", true);
773
704
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
704
                             _finish_dependency));
775
776
704
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
704
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
704
    return Status::OK();
779
704
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
1.68k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
1.68k
    RETURN_IF_ERROR(Base::init(state, info));
771
1.68k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
1.68k
                                                         "AsyncWriterDependency", true);
773
1.68k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
1.68k
                             _finish_dependency));
775
776
1.68k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
1.68k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
1.68k
    return Status::OK();
779
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
156
    RETURN_IF_ERROR(Base::init(state, info));
771
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
156
                                                         "AsyncWriterDependency", true);
773
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
156
                             _finish_dependency));
775
776
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
156
    return Status::OK();
779
156
}
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
69.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
69.8k
    RETURN_IF_ERROR(Base::open(state));
785
69.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
600k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
530k
        RETURN_IF_ERROR(
788
530k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
530k
    }
790
69.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
69.8k
    return Status::OK();
792
69.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
515
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
515
    RETURN_IF_ERROR(Base::open(state));
785
515
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
2.77k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
2.25k
        RETURN_IF_ERROR(
788
2.25k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
2.25k
    }
790
515
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
515
    return Status::OK();
792
515
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
86
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
86
    RETURN_IF_ERROR(Base::open(state));
785
86
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
402
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
316
        RETURN_IF_ERROR(
788
316
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
316
    }
790
86
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
86
    return Status::OK();
792
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
47.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
47.9k
    RETURN_IF_ERROR(Base::open(state));
785
47.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
342k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
294k
        RETURN_IF_ERROR(
788
294k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
294k
    }
790
47.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
47.9k
    return Status::OK();
792
47.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
9.53k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
9.53k
    RETURN_IF_ERROR(Base::open(state));
785
9.53k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
58.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
48.9k
        RETURN_IF_ERROR(
788
48.9k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
48.9k
    }
790
9.53k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
9.53k
    return Status::OK();
792
9.53k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
5.17k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
5.17k
    RETURN_IF_ERROR(Base::open(state));
785
5.17k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
135k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
130k
        RETURN_IF_ERROR(
788
130k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
130k
    }
790
5.17k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
5.17k
    return Status::OK();
792
5.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
4.00k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
4.00k
    RETURN_IF_ERROR(Base::open(state));
785
4.00k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
44.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
40.1k
        RETURN_IF_ERROR(
788
40.1k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
40.1k
    }
790
4.00k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
4.00k
    return Status::OK();
792
4.00k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
48
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
48
    RETURN_IF_ERROR(Base::open(state));
785
48
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
206
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
158
        RETURN_IF_ERROR(
788
158
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
158
    }
790
48
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
48
    return Status::OK();
792
48
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
704
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
704
    RETURN_IF_ERROR(Base::open(state));
785
704
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
2.11k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
1.40k
        RETURN_IF_ERROR(
788
1.40k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
1.40k
    }
790
704
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
704
    return Status::OK();
792
704
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
1.68k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
1.68k
    RETURN_IF_ERROR(Base::open(state));
785
1.68k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
13.2k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
11.5k
        RETURN_IF_ERROR(
788
11.5k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
11.5k
    }
790
1.68k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
1.68k
    return Status::OK();
792
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
156
    RETURN_IF_ERROR(Base::open(state));
785
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
630
        RETURN_IF_ERROR(
788
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
630
    }
790
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
156
    return Status::OK();
792
156
}
793
794
template <typename Writer, typename Parent>
795
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
796
95.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
95.1k
    return _writer->sink(block, eos);
798
95.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
2.41k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
2.41k
    return _writer->sink(block, eos);
798
2.41k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
110
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
110
    return _writer->sink(block, eos);
798
110
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
64.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
64.3k
    return _writer->sink(block, eos);
798
64.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
11.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
11.0k
    return _writer->sink(block, eos);
798
11.0k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
7.54k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
7.54k
    return _writer->sink(block, eos);
798
7.54k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
6.38k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
6.38k
    return _writer->sink(block, eos);
798
6.38k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
60
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
60
    return _writer->sink(block, eos);
798
60
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
794
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
794
    return _writer->sink(block, eos);
798
794
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
2.12k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
2.12k
    return _writer->sink(block, eos);
798
2.12k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
310
    return _writer->sink(block, eos);
798
310
}
799
800
template <typename Writer, typename Parent>
801
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
802
69.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
69.9k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
69.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
69.9k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
69.9k
    if (_writer) {
810
69.9k
        Status st = _writer->get_writer_status();
811
69.9k
        if (exec_status.ok()) {
812
69.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
69.8k
                                                       : Status::Cancelled("force close"));
814
69.8k
        } else {
815
85
            _writer->force_close(exec_status);
816
85
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
69.9k
        RETURN_IF_ERROR(st);
821
69.9k
    }
822
69.8k
    return Base::close(state, exec_status);
823
69.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
503
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
503
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
503
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
503
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
503
    if (_writer) {
810
503
        Status st = _writer->get_writer_status();
811
503
        if (exec_status.ok()) {
812
503
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
503
                                                       : Status::Cancelled("force close"));
814
503
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
503
        RETURN_IF_ERROR(st);
821
503
    }
822
503
    return Base::close(state, exec_status);
823
503
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
86
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
86
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
86
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
86
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
86
    if (_writer) {
810
86
        Status st = _writer->get_writer_status();
811
86
        if (exec_status.ok()) {
812
86
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
86
                                                       : Status::Cancelled("force close"));
814
86
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
86
        RETURN_IF_ERROR(st);
821
86
    }
822
78
    return Base::close(state, exec_status);
823
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
48.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
48.0k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
48.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
48.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
48.0k
    if (_writer) {
810
48.0k
        Status st = _writer->get_writer_status();
811
48.0k
        if (exec_status.ok()) {
812
48.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
48.0k
                                                       : Status::Cancelled("force close"));
814
48.0k
        } else {
815
35
            _writer->force_close(exec_status);
816
35
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
48.0k
        RETURN_IF_ERROR(st);
821
48.0k
    }
822
47.9k
    return Base::close(state, exec_status);
823
48.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
9.56k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
9.56k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
9.56k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
9.56k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
9.57k
    if (_writer) {
810
9.57k
        Status st = _writer->get_writer_status();
811
9.57k
        if (exec_status.ok()) {
812
9.52k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
9.52k
                                                       : Status::Cancelled("force close"));
814
9.52k
        } else {
815
52
            _writer->force_close(exec_status);
816
52
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
9.57k
        RETURN_IF_ERROR(st);
821
9.57k
    }
822
9.56k
    return Base::close(state, exec_status);
823
9.56k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
5.17k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
5.17k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
5.17k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
5.17k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
5.17k
    if (_writer) {
810
5.17k
        Status st = _writer->get_writer_status();
811
5.17k
        if (exec_status.ok()) {
812
5.17k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
5.17k
                                                       : Status::Cancelled("force close"));
814
5.17k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
5.17k
        RETURN_IF_ERROR(st);
821
5.17k
    }
822
5.17k
    return Base::close(state, exec_status);
823
5.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
4.00k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
4.00k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
4.00k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
4.00k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
4.00k
    if (_writer) {
810
4.00k
        Status st = _writer->get_writer_status();
811
4.00k
        if (exec_status.ok()) {
812
4.00k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
4.00k
                                                       : Status::Cancelled("force close"));
814
18.4E
        } else {
815
18.4E
            _writer->force_close(exec_status);
816
18.4E
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
4.00k
        RETURN_IF_ERROR(st);
821
4.00k
    }
822
3.99k
    return Base::close(state, exec_status);
823
4.00k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
48
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
48
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
48
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
48
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
48
    if (_writer) {
810
48
        Status st = _writer->get_writer_status();
811
48
        if (exec_status.ok()) {
812
48
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
48
                                                       : Status::Cancelled("force close"));
814
48
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
48
        RETURN_IF_ERROR(st);
821
48
    }
822
48
    return Base::close(state, exec_status);
823
48
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
702
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
702
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
702
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
702
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
704
    if (_writer) {
810
704
        Status st = _writer->get_writer_status();
811
704
        if (exec_status.ok()) {
812
704
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
704
                                                       : Status::Cancelled("force close"));
814
704
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
704
        RETURN_IF_ERROR(st);
821
704
    }
822
702
    return Base::close(state, exec_status);
823
702
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
1.68k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
1.68k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
1.68k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
1.68k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
1.68k
    if (_writer) {
810
1.68k
        Status st = _writer->get_writer_status();
811
1.68k
        if (exec_status.ok()) {
812
1.68k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
1.68k
                                                       : Status::Cancelled("force close"));
814
1.68k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
1.68k
        RETURN_IF_ERROR(st);
821
1.68k
    }
822
1.68k
    return Base::close(state, exec_status);
823
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
156
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
156
    if (_writer) {
810
156
        Status st = _writer->get_writer_status();
811
156
        if (exec_status.ok()) {
812
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
156
                                                       : Status::Cancelled("force close"));
814
156
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
156
        RETURN_IF_ERROR(st);
821
156
    }
822
156
    return Base::close(state, exec_status);
823
156
}
824
825
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
826
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
827
DECLARE_OPERATOR(ResultSinkLocalState)
828
DECLARE_OPERATOR(JdbcTableSinkLocalState)
829
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
830
DECLARE_OPERATOR(ResultFileSinkLocalState)
831
DECLARE_OPERATOR(OlapTableSinkLocalState)
832
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
833
DECLARE_OPERATOR(HiveTableSinkLocalState)
834
DECLARE_OPERATOR(TVFTableSinkLocalState)
835
DECLARE_OPERATOR(IcebergTableSinkLocalState)
836
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
837
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
838
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
839
DECLARE_OPERATOR(MCTableSinkLocalState)
840
DECLARE_OPERATOR(AnalyticSinkLocalState)
841
DECLARE_OPERATOR(BlackholeSinkLocalState)
842
DECLARE_OPERATOR(SortSinkLocalState)
843
DECLARE_OPERATOR(SpillSortSinkLocalState)
844
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
845
DECLARE_OPERATOR(AggSinkLocalState)
846
DECLARE_OPERATOR(BucketedAggSinkLocalState)
847
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
848
DECLARE_OPERATOR(ExchangeSinkLocalState)
849
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
850
DECLARE_OPERATOR(UnionSinkLocalState)
851
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
852
DECLARE_OPERATOR(PartitionSortSinkLocalState)
853
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
854
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
855
DECLARE_OPERATOR(SetSinkLocalState<true>)
856
DECLARE_OPERATOR(SetSinkLocalState<false>)
857
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
858
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
859
DECLARE_OPERATOR(CacheSinkLocalState)
860
DECLARE_OPERATOR(DictSinkLocalState)
861
DECLARE_OPERATOR(RecCTESinkLocalState)
862
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
863
864
#undef DECLARE_OPERATOR
865
866
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
867
DECLARE_OPERATOR(HashJoinProbeLocalState)
868
DECLARE_OPERATOR(OlapScanLocalState)
869
DECLARE_OPERATOR(GroupCommitLocalState)
870
DECLARE_OPERATOR(JDBCScanLocalState)
871
DECLARE_OPERATOR(FileScanLocalState)
872
DECLARE_OPERATOR(AnalyticLocalState)
873
DECLARE_OPERATOR(SortLocalState)
874
DECLARE_OPERATOR(SpillSortLocalState)
875
DECLARE_OPERATOR(LocalMergeSortLocalState)
876
DECLARE_OPERATOR(AggLocalState)
877
DECLARE_OPERATOR(BucketedAggLocalState)
878
DECLARE_OPERATOR(PartitionedAggLocalState)
879
DECLARE_OPERATOR(TableFunctionLocalState)
880
DECLARE_OPERATOR(ExchangeLocalState)
881
DECLARE_OPERATOR(RepeatLocalState)
882
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
883
DECLARE_OPERATOR(AssertNumRowsLocalState)
884
DECLARE_OPERATOR(EmptySetLocalState)
885
DECLARE_OPERATOR(UnionSourceLocalState)
886
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
887
DECLARE_OPERATOR(PartitionSortSourceLocalState)
888
DECLARE_OPERATOR(SetSourceLocalState<true>)
889
DECLARE_OPERATOR(SetSourceLocalState<false>)
890
DECLARE_OPERATOR(DataGenLocalState)
891
DECLARE_OPERATOR(SchemaScanLocalState)
892
DECLARE_OPERATOR(MetaScanLocalState)
893
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
894
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
895
DECLARE_OPERATOR(CacheSourceLocalState)
896
DECLARE_OPERATOR(RecCTESourceLocalState)
897
DECLARE_OPERATOR(RecCTEScanLocalState)
898
899
#ifdef BE_TEST
900
DECLARE_OPERATOR(MockLocalState)
901
DECLARE_OPERATOR(MockScanLocalState)
902
#endif
903
#undef DECLARE_OPERATOR
904
905
template class StreamingOperatorX<AssertNumRowsLocalState>;
906
template class StreamingOperatorX<SelectLocalState>;
907
908
template class StatefulOperatorX<HashJoinProbeLocalState>;
909
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
910
template class StatefulOperatorX<RepeatLocalState>;
911
template class StatefulOperatorX<MaterializationLocalState>;
912
template class StatefulOperatorX<StreamingAggLocalState>;
913
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
914
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
915
template class StatefulOperatorX<TableFunctionLocalState>;
916
917
template class PipelineXSinkLocalState<HashJoinSharedState>;
918
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
919
template class PipelineXSinkLocalState<SortSharedState>;
920
template class PipelineXSinkLocalState<SpillSortSharedState>;
921
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
922
template class PipelineXSinkLocalState<AnalyticSharedState>;
923
template class PipelineXSinkLocalState<AggSharedState>;
924
template class PipelineXSinkLocalState<BucketedAggSharedState>;
925
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
926
template class PipelineXSinkLocalState<FakeSharedState>;
927
template class PipelineXSinkLocalState<UnionSharedState>;
928
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
929
template class PipelineXSinkLocalState<MultiCastSharedState>;
930
template class PipelineXSinkLocalState<SetSharedState>;
931
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
932
template class PipelineXSinkLocalState<BasicSharedState>;
933
template class PipelineXSinkLocalState<DataQueueSharedState>;
934
template class PipelineXSinkLocalState<RecCTESharedState>;
935
936
template class PipelineXLocalState<HashJoinSharedState>;
937
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
938
template class PipelineXLocalState<SortSharedState>;
939
template class PipelineXLocalState<SpillSortSharedState>;
940
template class PipelineXLocalState<NestedLoopJoinSharedState>;
941
template class PipelineXLocalState<AnalyticSharedState>;
942
template class PipelineXLocalState<AggSharedState>;
943
template class PipelineXLocalState<BucketedAggSharedState>;
944
template class PipelineXLocalState<PartitionedAggSharedState>;
945
template class PipelineXLocalState<FakeSharedState>;
946
template class PipelineXLocalState<UnionSharedState>;
947
template class PipelineXLocalState<DataQueueSharedState>;
948
template class PipelineXLocalState<MultiCastSharedState>;
949
template class PipelineXLocalState<PartitionSortNodeSharedState>;
950
template class PipelineXLocalState<SetSharedState>;
951
template class PipelineXLocalState<LocalExchangeSharedState>;
952
template class PipelineXLocalState<BasicSharedState>;
953
template class PipelineXLocalState<RecCTESharedState>;
954
955
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
956
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
957
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
959
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
960
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
964
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
965
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
966
967
#ifdef BE_TEST
968
template class OperatorX<DummyOperatorLocalState>;
969
template class DataSinkOperatorX<DummySinkLocalState>;
970
#endif
971
972
} // namespace doris