Coverage Report

Created: 2026-10-23 21:13

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/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.79M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.79M
    if (_parent->nereids_id() == -1) {
123
945k
        return fmt::format("(id={})", _parent->node_id());
124
945k
    } else {
125
849k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
849k
    }
127
1.79M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
76.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
76.9k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
76.9k
    } else {
125
76.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
76.9k
    }
127
76.9k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
228k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
228k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
228k
    } else {
125
228k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
228k
    }
127
228k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
39
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
39
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
39
    } else {
125
39
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
39
    }
127
39
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
8.31k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
8.31k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
8.31k
    } else {
125
8.31k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.31k
    }
127
8.31k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.38k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.38k
    if (_parent->nereids_id() == -1) {
123
16
        return fmt::format("(id={})", _parent->node_id());
124
9.36k
    } else {
125
9.36k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.36k
    }
127
9.38k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
103k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
103k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
103k
    } else {
125
103k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
103k
    }
127
103k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
69.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
69.4k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
69.4k
    } else {
125
69.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
69.4k
    }
127
69.4k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
57
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
57
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
57
    } else {
125
57
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
57
    }
127
57
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
570k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
570k
    if (_parent->nereids_id() == -1) {
123
278k
        return fmt::format("(id={})", _parent->node_id());
124
291k
    } else {
125
291k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
291k
    }
127
570k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.3k
    } else {
125
56.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.3k
    }
127
56.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.12k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.12k
    if (_parent->nereids_id() == -1) {
123
5.12k
        return fmt::format("(id={})", _parent->node_id());
124
5.12k
    } else {
125
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
2
    }
127
5.12k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
410
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
410
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
308
    } else {
125
308
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
308
    }
127
410
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.09k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.09k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.08k
    } else {
125
5.08k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.08k
    }
127
5.09k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
661k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
661k
    if (_parent->nereids_id() == -1) {
123
661k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
661k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.24M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.24M
    if (_parent->nereids_id() == -1) {
132
687k
        return fmt::format("(id={})", _parent->node_id());
133
687k
    } else {
134
560k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
560k
    }
136
1.24M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
126k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
126k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
126k
    } else {
134
126k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
126k
    }
136
126k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
231k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
231k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
231k
    } else {
134
231k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
231k
    }
136
231k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
46
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
46
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
46
    } else {
134
46
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
46
    }
136
46
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.50k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.50k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
8.50k
    } else {
134
8.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.50k
    }
136
8.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.39k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.39k
    if (_parent->nereids_id() == -1) {
132
16
        return fmt::format("(id={})", _parent->node_id());
133
9.37k
    } else {
134
9.37k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.37k
    }
136
9.39k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
104k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
104k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
104k
    } else {
134
104k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
104k
    }
136
104k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
69.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
69.2k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
69.2k
    } else {
134
69.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
69.2k
    }
136
69.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
67
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
67
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
67
    } else {
134
67
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
67
    }
136
67
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
51
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
51
    if (_parent->nereids_id() == -1) {
132
51
        return fmt::format("(id={})", _parent->node_id());
133
51
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
51
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.8k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.8k
    } else {
134
10.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.8k
    }
136
10.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
409
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
409
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
307
    } else {
134
307
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
307
    }
136
409
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.8k
    if (_parent->nereids_id() == -1) {
132
12.8k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
259k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
259k
    if (_parent->nereids_id() == -1) {
132
259k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
259k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
414k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
414k
    if (_parent->nereids_id() == -1) {
132
414k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
414k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
33.6k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
33.6k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
33.6k
    _terminated = true;
144
33.6k
    return Status::OK();
145
33.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4.33k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4.33k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4.33k
    _terminated = true;
144
4.33k
    return Status::OK();
145
4.33k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.52k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.52k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.52k
    _terminated = true;
144
2.52k
    return Status::OK();
145
2.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.32k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.32k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.32k
    _terminated = true;
144
1.32k
    return Status::OK();
145
1.32k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
697
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
697
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
697
    _terminated = true;
144
697
    return Status::OK();
145
697
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
300
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
300
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
300
    _terminated = true;
144
300
    return Status::OK();
145
300
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
86
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
86
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
86
    _terminated = true;
144
86
    return Status::OK();
145
86
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
246
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
246
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
246
    _terminated = true;
144
246
    return Status::OK();
145
246
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
127
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
127
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
127
    _terminated = true;
144
127
    return Status::OK();
145
127
}
146
147
312k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
312k
    return _child && _child->is_serial_operator() && !is_source()
149
312k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
312k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
312k
}
152
153
22.8k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
22.8k
    if (!_child) {
155
22.1k
        return false;
156
22.1k
    }
157
728
    if (_child->is_serial_operator()) {
158
50
        return true;
159
50
    }
160
678
    const auto child_distribution = _child->required_data_distribution(state);
161
678
    return child_distribution.need_local_exchange() &&
162
678
           !is_shuffled_exchange(child_distribution.distribution_type);
163
728
}
164
165
template <typename SharedStateArg>
166
14.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.6k
    fmt::memory_buffer debug_string_buffer;
168
14.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.6k
    return fmt::to_string(debug_string_buffer);
170
14.6k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
60
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
60
    fmt::memory_buffer debug_string_buffer;
168
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
60
    return fmt::to_string(debug_string_buffer);
170
60
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
55
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
55
    fmt::memory_buffer debug_string_buffer;
168
55
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
55
    return fmt::to_string(debug_string_buffer);
170
55
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
187
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
187
    fmt::memory_buffer debug_string_buffer;
168
187
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
187
    return fmt::to_string(debug_string_buffer);
170
187
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.9k
    fmt::memory_buffer debug_string_buffer;
168
13.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.9k
    return fmt::to_string(debug_string_buffer);
170
13.9k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
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
166
345
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
345
    fmt::memory_buffer debug_string_buffer;
168
345
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
345
    return fmt::to_string(debug_string_buffer);
170
345
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
14.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.4k
    fmt::memory_buffer debug_string_buffer;
175
14.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.4k
    return fmt::to_string(debug_string_buffer);
177
14.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
55
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
55
    fmt::memory_buffer debug_string_buffer;
175
55
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
55
    return fmt::to_string(debug_string_buffer);
177
55
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
187
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
187
    fmt::memory_buffer debug_string_buffer;
175
187
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
187
    return fmt::to_string(debug_string_buffer);
177
187
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
230
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
230
    fmt::memory_buffer debug_string_buffer;
175
230
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
230
    return fmt::to_string(debug_string_buffer);
177
230
}
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
173
253
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
253
    fmt::memory_buffer debug_string_buffer;
175
253
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
253
    return fmt::to_string(debug_string_buffer);
177
253
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
13.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.7k
    fmt::memory_buffer debug_string_buffer;
175
13.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.7k
    return fmt::to_string(debug_string_buffer);
177
13.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
14.6k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
14.6k
    fmt::memory_buffer debug_string_buffer;
181
14.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
14.6k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
14.6k
                   _is_serial_operator);
184
14.6k
    return fmt::to_string(debug_string_buffer);
185
14.6k
}
186
187
14.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
14.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
14.6k
}
190
191
689k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
689k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
689k
    _nereids_id = tnode.nereids_id;
194
689k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.75k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.75k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.75k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.75k
    }
207
689k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
689k
    _op_name = substr + "_OPERATOR";
209
210
689k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
689k
    } else if (tnode.__isset.conjuncts) {
213
283k
        for (const auto& conjunct : tnode.conjuncts) {
214
283k
            VExprContextSPtr context;
215
283k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
283k
            _conjuncts.emplace_back(context);
217
283k
        }
218
105k
    }
219
220
    // create the projections expr
221
689k
    if (tnode.__isset.projections) {
222
275k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
275k
    }
224
689k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.76k
        DCHECK(has_projection()) << "no final projections";
226
6.76k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.1k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.1k
            VExprContextSPtrs projections;
229
12.1k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.1k
            _projection->intermediate_projections.push_back(projections);
231
12.1k
        }
232
6.76k
    }
233
689k
    return Status::OK();
234
689k
}
235
236
717k
Status OperatorXBase::prepare(RuntimeState* state) {
237
717k
    for (auto& conjunct : _conjuncts) {
238
283k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
283k
    }
240
717k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
666k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
346k
            return a->execute_cost() < b->execute_cost();
243
346k
        });
244
666k
    };
245
246
717k
    if (has_projection()) {
247
274k
        auto& projection = *_projection;
248
287k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.1k
            const auto& input_row_desc =
250
12.1k
                    i == 0 ? operator_row_desc_before_projection()
251
12.1k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.1k
            RETURN_IF_ERROR(
253
12.1k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.1k
        }
255
274k
        const auto& final_projection_input_row_desc =
256
274k
                projection.intermediate_output_row_descriptors.empty()
257
274k
                        ? operator_row_desc_before_projection()
258
274k
                        : projection.intermediate_output_row_descriptors.back();
259
274k
        RETURN_IF_ERROR(
260
274k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
274k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
274k
                                                      projection.output_row_descriptor));
263
274k
    }
264
265
717k
    for (auto& conjunct : _conjuncts) {
266
283k
        RETURN_IF_ERROR(conjunct->open(state));
267
283k
    }
268
717k
    if (has_projection()) {
269
275k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
274k
        for (auto& projections : _projection->intermediate_projections) {
271
12.1k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.1k
        }
273
274k
    }
274
717k
    if (_child && !is_source()) {
275
92.3k
        RETURN_IF_ERROR(_child->prepare(state));
276
92.3k
    }
277
278
717k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
717k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
717k
    return Status::OK();
284
717k
}
285
286
10.3k
Status OperatorXBase::terminate(RuntimeState* state) {
287
10.3k
    if (_child && !is_source()) {
288
660
        RETURN_IF_ERROR(_child->terminate(state));
289
660
    }
290
10.3k
    auto result = state->get_local_state_result(operator_id());
291
10.3k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
10.3k
    return result.value()->terminate(state);
295
10.3k
}
296
297
4.83M
Status OperatorXBase::close(RuntimeState* state) {
298
4.83M
    if (_child && !is_source()) {
299
734k
        RETURN_IF_ERROR(_child->close(state));
300
734k
    }
301
4.83M
    auto result = state->get_local_state_result(operator_id());
302
4.83M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.83M
    return result.value()->close(state);
306
4.83M
}
307
308
298k
void PipelineXLocalStateBase::clear_origin_block() {
309
298k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
298k
}
311
312
735k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
735k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
735k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
735k
    return Status::OK();
317
735k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
298k
                                     Block* output_block) const {
326
298k
    auto* local_state = state->get_local_state(operator_id());
327
298k
    SCOPED_TIMER(local_state->exec_time_counter());
328
298k
    SCOPED_TIMER(local_state->_projection_timer);
329
298k
    const size_t rows = origin_block->rows();
330
298k
    if (rows == 0) {
331
161k
        return Status::OK();
332
161k
    }
333
137k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
137k
    {
336
137k
        Block input_block = *origin_block;
337
338
137k
        ColumnsWithTypeAndName new_columns;
339
137k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.08k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.08k
            new_columns.resize(projections.size());
345
124k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
119k
            }
355
5.07k
            Block tmp_block {new_columns};
356
5.07k
            input_block.swap(tmp_block);
357
5.07k
        }
358
359
137k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
137k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
137k
                output_block, _projection->output_row_descriptor);
368
137k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
137k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
137k
        Columns shared_columns(mutable_columns.size());
371
372
789k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
651k
            ColumnPtr column_ptr;
374
651k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
651k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
651k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
651k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
651k
            if (column_ptr->is_exclusive()) {
386
237k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
414k
            } else {
388
414k
                shared_columns[i] = std::move(column_ptr);
389
414k
            }
390
651k
        }
391
392
137k
        scoped_mutable_block.restore();
393
789k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
652k
            if (shared_columns[i]) {
395
414k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
414k
            }
397
652k
        }
398
137k
    }
399
400
0
    origin_block->clear_column_data(
401
137k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
137k
    DCHECK_EQ(output_block->rows(), rows);
403
404
137k
    return Status::OK();
405
137k
}
406
407
4.12M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.12M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.12M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.12M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.12M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.12M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.12M
            if (_debug_point_count++ % 2 == 0) {
414
4.12M
                return Status::OK();
415
4.12M
            }
416
4.12M
        }
417
4.12M
    });
418
419
4.12M
    Status status;
420
4.12M
    auto* local_state = state->get_local_state(operator_id());
421
4.12M
    Defer defer([&]() {
422
4.12M
        if (status.ok()) {
423
4.12M
            local_state->update_output_block_counters(*block);
424
4.12M
        }
425
4.12M
    });
426
4.12M
    if (has_projection()) {
427
298k
        local_state->clear_origin_block();
428
298k
        status = get_block(state, &local_state->_origin_block, eos);
429
298k
        if (UNLIKELY(!status.ok())) {
430
41
            return status;
431
41
        }
432
298k
        status = do_projections(state, &local_state->_origin_block, block);
433
298k
        return status;
434
298k
    }
435
3.82M
    status = get_block(state, block, eos);
436
3.82M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.82M
    return status;
438
3.82M
}
439
440
2.74M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.74M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.98k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.98k
        *eos = true;
444
9.98k
    }
445
446
2.74M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.74M
        auto op_name = to_lower(_parent->_op_name);
448
2.74M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.74M
        arg_op_name = to_lower(arg_op_name);
450
451
2.74M
        if (op_name == arg_op_name) {
452
2.74M
            *eos = true;
453
2.74M
        }
454
2.74M
    });
455
456
2.74M
    if (auto rows = block->rows()) {
457
778k
        _num_rows_returned += rows;
458
778k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
778k
    }
460
2.74M
}
461
462
33.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
33.6k
    auto result = state->get_sink_local_state_result();
464
33.6k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
33.6k
    return result.value()->terminate(state);
468
33.6k
}
469
470
14.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
14.4k
    fmt::memory_buffer debug_string_buffer;
472
473
14.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
14.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
14.4k
    return fmt::to_string(debug_string_buffer);
476
14.4k
}
477
478
14.4k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
14.4k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
14.4k
}
481
482
360k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
360k
    std::string op_name = "UNKNOWN_SINK";
484
360k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
361k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
361k
        op_name = it->second;
488
361k
    }
489
360k
    _name = op_name + "_OPERATOR";
490
360k
    return Status::OK();
491
360k
}
492
493
310k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
310k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
310k
    _nereids_id = tnode.nereids_id;
496
310k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
310k
    _name = substr + "_SINK_OPERATOR";
498
310k
    return Status::OK();
499
310k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.77M
                                                            LocalSinkStateInfo& info) {
504
1.77M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.77M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.77M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.77M
    return Status::OK();
508
1.77M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
126k
                                                            LocalSinkStateInfo& info) {
504
126k
    auto local_state = LocalStateType::create_unique(this, state);
505
126k
    RETURN_IF_ERROR(local_state->init(state, info));
506
126k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
126k
    return Status::OK();
508
126k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
364k
                                                            LocalSinkStateInfo& info) {
504
364k
    auto local_state = LocalStateType::create_unique(this, state);
505
364k
    RETURN_IF_ERROR(local_state->init(state, info));
506
364k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
364k
    return Status::OK();
508
364k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
377
                                                            LocalSinkStateInfo& info) {
504
377
    auto local_state = LocalStateType::create_unique(this, state);
505
377
    RETURN_IF_ERROR(local_state->init(state, info));
506
377
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
377
    return Status::OK();
508
377
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
50.1k
                                                            LocalSinkStateInfo& info) {
504
50.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
50.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
50.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
50.1k
    return Status::OK();
508
50.1k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.39k
                                                            LocalSinkStateInfo& info) {
504
9.39k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.39k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.39k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.39k
    return Status::OK();
508
9.39k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48
                                                            LocalSinkStateInfo& info) {
504
48
    auto local_state = LocalStateType::create_unique(this, state);
505
48
    RETURN_IF_ERROR(local_state->init(state, info));
506
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48
    return Status::OK();
508
48
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
232k
                                                            LocalSinkStateInfo& info) {
504
232k
    auto local_state = LocalStateType::create_unique(this, state);
505
232k
    RETURN_IF_ERROR(local_state->init(state, info));
506
232k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
232k
    return Status::OK();
508
232k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46
                                                            LocalSinkStateInfo& info) {
504
46
    auto local_state = LocalStateType::create_unique(this, state);
505
46
    RETURN_IF_ERROR(local_state->init(state, info));
506
46
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46
    return Status::OK();
508
46
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
259k
                                                            LocalSinkStateInfo& info) {
504
259k
    auto local_state = LocalStateType::create_unique(this, state);
505
259k
    RETURN_IF_ERROR(local_state->init(state, info));
506
259k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
259k
    return Status::OK();
508
259k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
104k
                                                            LocalSinkStateInfo& info) {
504
104k
    auto local_state = LocalStateType::create_unique(this, state);
505
104k
    RETURN_IF_ERROR(local_state->init(state, info));
506
104k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
104k
    return Status::OK();
508
104k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
69.2k
                                                            LocalSinkStateInfo& info) {
504
69.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
69.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
69.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
69.2k
    return Status::OK();
508
69.2k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
67
                                                            LocalSinkStateInfo& info) {
504
67
    auto local_state = LocalStateType::create_unique(this, state);
505
67
    RETURN_IF_ERROR(local_state->init(state, info));
506
67
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
67
    return Status::OK();
508
67
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
524k
                                                            LocalSinkStateInfo& info) {
504
524k
    auto local_state = LocalStateType::create_unique(this, state);
505
524k
    RETURN_IF_ERROR(local_state->init(state, info));
506
524k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
524k
    return Status::OK();
508
524k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.49k
                                                            LocalSinkStateInfo& info) {
504
8.49k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.49k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.49k
    return Status::OK();
508
8.49k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.8k
                                                            LocalSinkStateInfo& info) {
504
10.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.8k
    return Status::OK();
508
10.8k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.13k
                                                            LocalSinkStateInfo& info) {
504
2.13k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.13k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.13k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.13k
    return Status::OK();
508
2.13k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
308
                                                            LocalSinkStateInfo& info) {
504
308
    auto local_state = LocalStateType::create_unique(this, state);
505
308
    RETURN_IF_ERROR(local_state->init(state, info));
506
308
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
308
    return Status::OK();
508
308
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.91k
                                                            LocalSinkStateInfo& info) {
504
4.91k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.91k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.91k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.91k
    return Status::OK();
508
4.91k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.64k
                                                            LocalSinkStateInfo& info) {
504
2.64k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.64k
    return Status::OK();
508
2.64k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.71k
                                                            LocalSinkStateInfo& info) {
504
2.71k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.71k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.71k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.71k
    return Status::OK();
508
2.71k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
560
                                                            LocalSinkStateInfo& info) {
504
560
    auto local_state = LocalStateType::create_unique(this, state);
505
560
    RETURN_IF_ERROR(local_state->init(state, info));
506
560
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
560
    return Status::OK();
508
560
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
104
                                                            LocalSinkStateInfo& info) {
504
104
    auto local_state = LocalStateType::create_unique(this, state);
505
104
    RETURN_IF_ERROR(local_state->init(state, info));
506
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
104
    return Status::OK();
508
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.41M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.41M
    } else {
519
1.41M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.41M
        ss->id = operator_id();
521
1.41M
        for (auto& dest : dests_id()) {
522
1.40M
            ss->related_op_ids.insert(dest);
523
1.40M
        }
524
1.41M
        return ss;
525
1.41M
    }
526
1.41M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
107k
    } else {
519
107k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107k
        ss->id = operator_id();
521
107k
        for (auto& dest : dests_id()) {
522
107k
            ss->related_op_ids.insert(dest);
523
107k
        }
524
107k
        return ss;
525
107k
    }
526
107k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
364k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
364k
    } else {
519
364k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
364k
        ss->id = operator_id();
521
364k
        for (auto& dest : dests_id()) {
522
363k
            ss->related_op_ids.insert(dest);
523
363k
        }
524
364k
        return ss;
525
364k
    }
526
364k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
377
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
377
    } else {
519
377
        auto ss = LocalStateType::SharedStateType::create_shared();
520
377
        ss->id = operator_id();
521
377
        for (auto& dest : dests_id()) {
522
377
            ss->related_op_ids.insert(dest);
523
377
        }
524
377
        return ss;
525
377
    }
526
377
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
50.2k
    } else {
519
50.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.2k
        ss->id = operator_id();
521
50.2k
        for (auto& dest : dests_id()) {
522
49.8k
            ss->related_op_ids.insert(dest);
523
49.8k
        }
524
50.2k
        return ss;
525
50.2k
    }
526
50.2k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.42k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.42k
    } else {
519
9.42k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.42k
        ss->id = operator_id();
521
9.44k
        for (auto& dest : dests_id()) {
522
9.44k
            ss->related_op_ids.insert(dest);
523
9.44k
        }
524
9.42k
        return ss;
525
9.42k
    }
526
9.42k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
48
    } else {
519
48
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48
        ss->id = operator_id();
521
48
        for (auto& dest : dests_id()) {
522
48
            ss->related_op_ids.insert(dest);
523
48
        }
524
48
        return ss;
525
48
    }
526
48
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
233k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
233k
    } else {
519
233k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
233k
        ss->id = operator_id();
521
233k
        for (auto& dest : dests_id()) {
522
233k
            ss->related_op_ids.insert(dest);
523
233k
        }
524
233k
        return ss;
525
233k
    }
526
233k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
48
    } else {
519
48
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48
        ss->id = operator_id();
521
48
        for (auto& dest : dests_id()) {
522
48
            ss->related_op_ids.insert(dest);
523
48
        }
524
48
        return ss;
525
48
    }
526
48
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
105k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
105k
    } else {
519
105k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
105k
        ss->id = operator_id();
521
105k
        for (auto& dest : dests_id()) {
522
105k
            ss->related_op_ids.insert(dest);
523
105k
        }
524
105k
        return ss;
525
105k
    }
526
105k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
66
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
66
    } else {
519
66
        auto ss = LocalStateType::SharedStateType::create_shared();
520
66
        ss->id = operator_id();
521
66
        for (auto& dest : dests_id()) {
522
66
            ss->related_op_ids.insert(dest);
523
66
        }
524
66
        return ss;
525
66
    }
526
66
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
526k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
526k
    } else {
519
526k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
526k
        ss->id = operator_id();
521
526k
        for (auto& dest : dests_id()) {
522
519k
            ss->related_op_ids.insert(dest);
523
519k
        }
524
526k
        return ss;
525
526k
    }
526
526k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8.60k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8.60k
    } else {
519
8.60k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.60k
        ss->id = operator_id();
521
8.60k
        for (auto& dest : dests_id()) {
522
8.59k
            ss->related_op_ids.insert(dest);
523
8.59k
        }
524
8.60k
        return ss;
525
8.60k
    }
526
8.60k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
411
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
411
    } else {
519
411
        auto ss = LocalStateType::SharedStateType::create_shared();
520
411
        ss->id = operator_id();
521
411
        for (auto& dest : dests_id()) {
522
411
            ss->related_op_ids.insert(dest);
523
411
        }
524
411
        return ss;
525
411
    }
526
411
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.71k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.71k
    } else {
519
2.71k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.71k
        ss->id = operator_id();
521
2.72k
        for (auto& dest : dests_id()) {
522
2.72k
            ss->related_op_ids.insert(dest);
523
2.72k
        }
524
2.71k
        return ss;
525
2.71k
    }
526
2.71k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.56k
        for (auto& dest : dests_id()) {
522
2.56k
            ss->related_op_ids.insert(dest);
523
2.56k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
559
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
559
    } else {
519
559
        auto ss = LocalStateType::SharedStateType::create_shared();
520
559
        ss->id = operator_id();
521
559
        for (auto& dest : dests_id()) {
522
548
            ss->related_op_ids.insert(dest);
523
548
        }
524
559
        return ss;
525
559
    }
526
559
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
104
    } else {
519
104
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104
        ss->id = operator_id();
521
104
        for (auto& dest : dests_id()) {
522
102
            ss->related_op_ids.insert(dest);
523
102
        }
524
104
        return ss;
525
104
    }
526
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.06M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.06M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.06M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.06M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.06M
    return Status::OK();
534
2.06M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
77.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
77.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
77.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
77.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
77.6k
    return Status::OK();
534
77.6k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
257k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
257k
    auto local_state = LocalStateType::create_unique(state, this);
531
257k
    RETURN_IF_ERROR(local_state->init(state, info));
532
257k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
257k
    return Status::OK();
534
257k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
138
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
138
    auto local_state = LocalStateType::create_unique(state, this);
531
138
    RETURN_IF_ERROR(local_state->init(state, info));
532
138
    state->emplace_local_state(operator_id(), std::move(local_state));
533
138
    return Status::OK();
534
138
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.28k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.28k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.28k
    return Status::OK();
534
3.28k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.37k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.37k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.37k
    return Status::OK();
534
9.37k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.69k
    return Status::OK();
534
8.69k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
39
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
39
    auto local_state = LocalStateType::create_unique(state, this);
531
39
    RETURN_IF_ERROR(local_state->init(state, info));
532
39
    state->emplace_local_state(operator_id(), std::move(local_state));
533
39
    return Status::OK();
534
39
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
223k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
223k
    auto local_state = LocalStateType::create_unique(state, this);
531
223k
    RETURN_IF_ERROR(local_state->init(state, info));
532
223k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
223k
    return Status::OK();
534
223k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
104k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
104k
    auto local_state = LocalStateType::create_unique(state, this);
531
104k
    RETURN_IF_ERROR(local_state->init(state, info));
532
104k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
104k
    return Status::OK();
534
104k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
69.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
69.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
69.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
69.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
69.6k
    return Status::OK();
534
69.6k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
57
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
57
    auto local_state = LocalStateType::create_unique(state, this);
531
57
    RETURN_IF_ERROR(local_state->init(state, info));
532
57
    state->emplace_local_state(operator_id(), std::move(local_state));
533
57
    return Status::OK();
534
57
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.88k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.88k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.88k
    return Status::OK();
534
4.88k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
279k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
279k
    auto local_state = LocalStateType::create_unique(state, this);
531
279k
    RETURN_IF_ERROR(local_state->init(state, info));
532
279k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
279k
    return Status::OK();
534
279k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.30k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.30k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.30k
    return Status::OK();
534
1.30k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.28k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.28k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.28k
    return Status::OK();
534
8.28k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.56k
    return Status::OK();
534
1.56k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.5k
    return Status::OK();
534
56.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.09k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.09k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.09k
    return Status::OK();
534
5.09k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
308
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
308
    auto local_state = LocalStateType::create_unique(state, this);
531
308
    RETURN_IF_ERROR(local_state->init(state, info));
532
308
    state->emplace_local_state(operator_id(), std::move(local_state));
533
308
    return Status::OK();
534
308
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.69k
    return Status::OK();
534
2.69k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.52k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.52k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.52k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.52k
    return Status::OK();
534
2.52k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
587
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
587
    auto local_state = LocalStateType::create_unique(state, this);
531
587
    RETURN_IF_ERROR(local_state->init(state, info));
532
587
    state->emplace_local_state(operator_id(), std::move(local_state));
533
587
    return Status::OK();
534
587
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
666k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
666k
    auto local_state = LocalStateType::create_unique(state, this);
531
666k
    RETURN_IF_ERROR(local_state->init(state, info));
532
666k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
666k
    return Status::OK();
534
666k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
796
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
796
    auto local_state = LocalStateType::create_unique(state, this);
531
796
    RETURN_IF_ERROR(local_state->init(state, info));
532
796
    state->emplace_local_state(operator_id(), std::move(local_state));
533
796
    return Status::OK();
534
796
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
773
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
773
    auto local_state = LocalStateType::create_unique(state, this);
531
773
    RETURN_IF_ERROR(local_state->init(state, info));
532
773
    state->emplace_local_state(operator_id(), std::move(local_state));
533
773
    return Status::OK();
534
773
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.14k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.14k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.14k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.14k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.14k
    return Status::OK();
534
7.14k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
261k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
261k
    auto local_state = LocalStateType::create_unique(state, this);
531
261k
    RETURN_IF_ERROR(local_state->init(state, info));
532
261k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
261k
    return Status::OK();
534
261k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.77M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.05M
        : _num_rows_returned(0),
542
2.05M
          _rows_returned_counter(nullptr),
543
2.05M
          _parent(parent),
544
2.05M
          _state(state),
545
2.05M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.07M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.07M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.07M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.07M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.07M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.07M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.07M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.07M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.07M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.07M
    if constexpr (!is_fake_shared) {
560
1.24M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
747k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
747k
                                    .first.get()
563
747k
                                    ->template cast<SharedStateArg>();
564
565
747k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
747k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
747k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
747k
        } else if (info.shared_state) {
569
419k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
419k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
419k
            _dependency = _shared_state->create_source_dependency(
576
419k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
419k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
419k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
419k
        } else {
580
74.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
9.84k
                DCHECK(false);
582
9.84k
            }
583
74.3k
        }
584
1.24M
    }
585
586
2.07M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.07M
    _rows_returned_counter =
591
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.07M
    _blocks_returned_counter =
593
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.07M
    _output_block_bytes_counter =
595
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.07M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.07M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.07M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.07M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.07M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.07M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.07M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.07M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.07M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.07M
    _memory_used_counter =
606
2.07M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.07M
    _common_profile->add_info_string("IsColocate",
608
2.07M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.07M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.07M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.07M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.07M
    return Status::OK();
613
2.07M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
78.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
78.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
78.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
78.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
78.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
78.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
78.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
78.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
78.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
78.0k
    if constexpr (!is_fake_shared) {
560
78.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
17.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
17.4k
                                    .first.get()
563
17.4k
                                    ->template cast<SharedStateArg>();
564
565
17.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
17.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
17.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
60.6k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
58.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
58.5k
            _dependency = _shared_state->create_source_dependency(
576
58.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
58.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
58.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
58.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.10k
        }
584
78.0k
    }
585
586
78.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
78.0k
    _rows_returned_counter =
591
78.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
78.0k
    _blocks_returned_counter =
593
78.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
78.0k
    _output_block_bytes_counter =
595
78.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
78.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
78.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
78.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
78.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
78.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
78.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
78.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
78.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
78.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
78.0k
    _memory_used_counter =
606
78.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
78.0k
    _common_profile->add_info_string("IsColocate",
608
78.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
78.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
78.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
78.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
78.0k
    return Status::OK();
613
78.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
232k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
232k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
232k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
232k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
232k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
232k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
232k
    _operator_profile->add_child(_common_profile.get(), true);
557
232k
    _operator_profile->add_child(_custom_profile.get(), true);
558
232k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
232k
    if constexpr (!is_fake_shared) {
560
232k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
232k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
225k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
225k
            _dependency = _shared_state->create_source_dependency(
576
225k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
225k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
225k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
225k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6.76k
        }
584
232k
    }
585
586
232k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
232k
    _rows_returned_counter =
591
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
232k
    _blocks_returned_counter =
593
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
232k
    _output_block_bytes_counter =
595
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
232k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
232k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
232k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
232k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
232k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
232k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
232k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
232k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
232k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
232k
    _memory_used_counter =
606
232k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
232k
    _common_profile->add_info_string("IsColocate",
608
232k
                                     std::to_string(_parent->is_colocated_operator()));
609
232k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
232k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
232k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
232k
    return Status::OK();
613
232k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
39
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
39
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
39
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
39
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
39
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
39
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
39
    _operator_profile->add_child(_common_profile.get(), true);
557
39
    _operator_profile->add_child(_custom_profile.get(), true);
558
39
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
39
    if constexpr (!is_fake_shared) {
560
39
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
39
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
39
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
39
            _dependency = _shared_state->create_source_dependency(
576
39
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
39
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
39
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
39
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
39
    }
585
586
39
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
39
    _rows_returned_counter =
591
39
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
39
    _blocks_returned_counter =
593
39
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
39
    _output_block_bytes_counter =
595
39
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
39
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
39
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
39
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
39
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
39
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
39
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
39
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
39
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
39
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
39
    _memory_used_counter =
606
39
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
39
    _common_profile->add_info_string("IsColocate",
608
39
                                     std::to_string(_parent->is_colocated_operator()));
609
39
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
39
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
39
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
39
    return Status::OK();
613
39
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.41k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.41k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.41k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.41k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.41k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
8.41k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.41k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.41k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.41k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.41k
    if constexpr (!is_fake_shared) {
560
8.41k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
8.41k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
8.03k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.03k
            _dependency = _shared_state->create_source_dependency(
576
8.03k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.03k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.03k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.03k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
384
        }
584
8.41k
    }
585
586
8.41k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
8.41k
    _rows_returned_counter =
591
8.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.41k
    _blocks_returned_counter =
593
8.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.41k
    _output_block_bytes_counter =
595
8.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.41k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.41k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.41k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.41k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.41k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.41k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.41k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.41k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.41k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.41k
    _memory_used_counter =
606
8.41k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.41k
    _common_profile->add_info_string("IsColocate",
608
8.41k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.41k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.41k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.41k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.41k
    return Status::OK();
613
8.41k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.43k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.43k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.43k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.43k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.43k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.43k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.43k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.43k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.43k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.43k
    if constexpr (!is_fake_shared) {
560
9.43k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.43k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.28k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.28k
            _dependency = _shared_state->create_source_dependency(
576
9.28k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.28k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.28k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.28k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
144
        }
584
9.43k
    }
585
586
9.43k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.43k
    _rows_returned_counter =
591
9.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.43k
    _blocks_returned_counter =
593
9.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.43k
    _output_block_bytes_counter =
595
9.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.43k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.43k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.43k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.43k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.43k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.43k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.43k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.43k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.43k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.43k
    _memory_used_counter =
606
9.43k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.43k
    _common_profile->add_info_string("IsColocate",
608
9.43k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.43k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.43k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.43k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.43k
    return Status::OK();
613
9.43k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
104k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
104k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
104k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
104k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
104k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
104k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
104k
    _operator_profile->add_child(_common_profile.get(), true);
557
104k
    _operator_profile->add_child(_custom_profile.get(), true);
558
104k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
104k
    if constexpr (!is_fake_shared) {
560
104k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
104k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
102k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
102k
            _dependency = _shared_state->create_source_dependency(
576
102k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
102k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
102k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
102k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.83k
        }
584
104k
    }
585
586
104k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
104k
    _rows_returned_counter =
591
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
104k
    _blocks_returned_counter =
593
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
104k
    _output_block_bytes_counter =
595
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
104k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
104k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
104k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
104k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
104k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
104k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
104k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
104k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
104k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
104k
    _memory_used_counter =
606
104k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
104k
    _common_profile->add_info_string("IsColocate",
608
104k
                                     std::to_string(_parent->is_colocated_operator()));
609
104k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
104k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
104k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
104k
    return Status::OK();
613
104k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
69.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
69.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
69.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
69.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
69.5k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
69.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
69.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
69.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
69.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
69.5k
    if constexpr (!is_fake_shared) {
560
69.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
69.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
69.5k
                                    .first.get()
563
69.5k
                                    ->template cast<SharedStateArg>();
564
565
69.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
69.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
69.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
69.5k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
69
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
69
        }
584
69.5k
    }
585
586
69.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
69.5k
    _rows_returned_counter =
591
69.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
69.5k
    _blocks_returned_counter =
593
69.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
69.5k
    _output_block_bytes_counter =
595
69.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
69.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
69.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
69.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
69.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
69.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
69.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
69.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
69.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
69.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
69.5k
    _memory_used_counter =
606
69.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
69.5k
    _common_profile->add_info_string("IsColocate",
608
69.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
69.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
69.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
69.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
69.5k
    return Status::OK();
613
69.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
57
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
57
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
57
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
57
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
57
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
57
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
57
    _operator_profile->add_child(_common_profile.get(), true);
557
57
    _operator_profile->add_child(_custom_profile.get(), true);
558
57
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
57
    if constexpr (!is_fake_shared) {
560
57
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
57
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
57
            _dependency = _shared_state->create_source_dependency(
576
57
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
57
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
57
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
57
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
57
    }
585
586
57
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
57
    _rows_returned_counter =
591
57
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
57
    _blocks_returned_counter =
593
57
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
57
    _output_block_bytes_counter =
595
57
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
57
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
57
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
57
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
57
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
57
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
57
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
57
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
57
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
57
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
57
    _memory_used_counter =
606
57
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
57
    _common_profile->add_info_string("IsColocate",
608
57
                                     std::to_string(_parent->is_colocated_operator()));
609
57
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
57
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
57
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
57
    return Status::OK();
613
57
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
831k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
831k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
831k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
831k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
831k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
831k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
831k
    _operator_profile->add_child(_common_profile.get(), true);
557
831k
    _operator_profile->add_child(_custom_profile.get(), true);
558
831k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
831k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
831k
    _rows_returned_counter =
591
831k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
831k
    _blocks_returned_counter =
593
831k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
831k
    _output_block_bytes_counter =
595
831k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
831k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
831k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
831k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
831k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
831k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
831k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
831k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
831k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
831k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
831k
    _memory_used_counter =
606
831k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
831k
    _common_profile->add_info_string("IsColocate",
608
831k
                                     std::to_string(_parent->is_colocated_operator()));
609
831k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
831k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
831k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
831k
    return Status::OK();
613
831k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.4k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.4k
    if constexpr (!is_fake_shared) {
560
56.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.71k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.71k
            _dependency = _shared_state->create_source_dependency(
576
4.71k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.71k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.71k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.7k
        }
584
56.4k
    }
585
586
56.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.4k
    _rows_returned_counter =
591
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.4k
    _blocks_returned_counter =
593
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.4k
    _output_block_bytes_counter =
595
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.4k
    _memory_used_counter =
606
56.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.4k
    _common_profile->add_info_string("IsColocate",
608
56.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.4k
    return Status::OK();
613
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.14k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.14k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.14k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.14k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.14k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.14k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.14k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.14k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.14k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.14k
    if constexpr (!is_fake_shared) {
560
5.14k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.14k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.10k
            _dependency = _shared_state->create_source_dependency(
576
5.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.10k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
42
        }
584
5.14k
    }
585
586
5.14k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.14k
    _rows_returned_counter =
591
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.14k
    _blocks_returned_counter =
593
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.14k
    _output_block_bytes_counter =
595
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.14k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.14k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.14k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.14k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.14k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.14k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.14k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.14k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.14k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.14k
    _memory_used_counter =
606
5.14k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.14k
    _common_profile->add_info_string("IsColocate",
608
5.14k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.14k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.14k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.14k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.14k
    return Status::OK();
613
5.14k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
411
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
411
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
411
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
411
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
411
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
411
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
411
    _operator_profile->add_child(_common_profile.get(), true);
557
411
    _operator_profile->add_child(_custom_profile.get(), true);
558
411
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
411
    if constexpr (!is_fake_shared) {
560
411
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
411
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
411
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
411
            _dependency = _shared_state->create_source_dependency(
576
411
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
411
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
411
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
411
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
411
    }
585
586
411
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
411
    _rows_returned_counter =
591
411
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
411
    _blocks_returned_counter =
593
411
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
411
    _output_block_bytes_counter =
595
411
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
411
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
411
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
411
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
411
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
411
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
411
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
411
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
411
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
411
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
411
    _memory_used_counter =
606
411
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
411
    _common_profile->add_info_string("IsColocate",
608
411
                                     std::to_string(_parent->is_colocated_operator()));
609
411
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
411
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
411
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
411
    return Status::OK();
613
411
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.30k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.30k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.30k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.30k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.30k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.30k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.30k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.30k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.30k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.30k
    if constexpr (!is_fake_shared) {
560
5.30k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.30k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.89k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.89k
            _dependency = _shared_state->create_source_dependency(
576
4.89k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.89k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.89k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.89k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
410
        }
584
5.30k
    }
585
586
5.30k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.30k
    _rows_returned_counter =
591
5.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.30k
    _blocks_returned_counter =
593
5.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.30k
    _output_block_bytes_counter =
595
5.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.30k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.30k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.30k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.30k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.30k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.30k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.30k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.30k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.30k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.30k
    _memory_used_counter =
606
5.30k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.30k
    _common_profile->add_info_string("IsColocate",
608
5.30k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.30k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.30k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.30k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.30k
    return Status::OK();
613
5.30k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
670k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
670k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
670k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
670k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
670k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
670k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
670k
    _operator_profile->add_child(_common_profile.get(), true);
557
670k
    _operator_profile->add_child(_custom_profile.get(), true);
558
670k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
670k
    if constexpr (!is_fake_shared) {
560
670k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
660k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
660k
                                    .first.get()
563
660k
                                    ->template cast<SharedStateArg>();
564
565
660k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
660k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
660k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
660k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.84k
        } else {
580
9.84k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
9.84k
                DCHECK(false);
582
9.84k
            }
583
9.84k
        }
584
670k
    }
585
586
670k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
670k
    _rows_returned_counter =
591
670k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
670k
    _blocks_returned_counter =
593
670k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
670k
    _output_block_bytes_counter =
595
670k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
670k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
670k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
670k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
670k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
670k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
670k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
670k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
670k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
670k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
670k
    _memory_used_counter =
606
670k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
670k
    _common_profile->add_info_string("IsColocate",
608
670k
                                     std::to_string(_parent->is_colocated_operator()));
609
670k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
670k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
670k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
670k
    return Status::OK();
613
670k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.08M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.08M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.40M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
315k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
315k
    }
621
2.08M
    if (_parent->has_projection()) {
622
408k
        const auto& projection = *_parent->_projection;
623
408k
        _projections.resize(projection.projections.size());
624
2.54M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.13M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.13M
        }
627
408k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
434k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
25.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
395k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
369k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
369k
                        state, _intermediate_projections[i][j]));
633
369k
            }
634
25.9k
        }
635
408k
    }
636
2.08M
    return Status::OK();
637
2.08M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
79.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
79.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
81.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.18k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.18k
    }
621
79.1k
    if (_parent->has_projection()) {
622
79.1k
        const auto& projection = *_parent->_projection;
623
79.1k
        _projections.resize(projection.projections.size());
624
460k
        for (size_t i = 0; i < _projections.size(); i++) {
625
380k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
380k
        }
627
79.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
89.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
302k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
292k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
292k
                        state, _intermediate_projections[i][j]));
633
292k
            }
634
10.0k
        }
635
79.1k
    }
636
79.1k
    return Status::OK();
637
79.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
233k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
233k
    _conjuncts.resize(_parent->_conjuncts.size());
618
233k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
233k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
233k
    return Status::OK();
637
233k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
39
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
39
    _conjuncts.resize(_parent->_conjuncts.size());
618
39
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
39
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
39
    return Status::OK();
637
39
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.65k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.65k
    _conjuncts.resize(_parent->_conjuncts.size());
618
8.72k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
69
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
69
    }
621
8.65k
    if (_parent->has_projection()) {
622
8.65k
        const auto& projection = *_parent->_projection;
623
8.65k
        _projections.resize(projection.projections.size());
624
38.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
29.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
29.6k
        }
627
8.65k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
8.70k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
45
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
298
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
253
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
253
                        state, _intermediate_projections[i][j]));
633
253
            }
634
45
        }
635
8.65k
    }
636
8.65k
    return Status::OK();
637
8.65k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.44k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.44k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
893
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
893
    }
621
9.44k
    if (_parent->has_projection()) {
622
4.64k
        const auto& projection = *_parent->_projection;
623
4.64k
        _projections.resize(projection.projections.size());
624
20.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.4k
        }
627
4.64k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.73k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
91
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
693
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
602
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
602
                        state, _intermediate_projections[i][j]));
633
602
            }
634
91
        }
635
4.64k
    }
636
9.44k
    return Status::OK();
637
9.44k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
105k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
105k
    _conjuncts.resize(_parent->_conjuncts.size());
618
107k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.64k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.64k
    }
621
105k
    if (_parent->has_projection()) {
622
32.4k
        const auto& projection = *_parent->_projection;
623
32.4k
        _projections.resize(projection.projections.size());
624
292k
        for (size_t i = 0; i < _projections.size(); i++) {
625
260k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
260k
        }
627
32.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
749
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.68k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.94k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.94k
                        state, _intermediate_projections[i][j]));
633
3.94k
            }
634
749
        }
635
32.4k
    }
636
105k
    return Status::OK();
637
105k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
69.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
69.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
69.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
32
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
32
    }
621
69.6k
    if (_parent->has_projection()) {
622
290
        const auto& projection = *_parent->_projection;
623
290
        _projections.resize(projection.projections.size());
624
1.19k
        for (size_t i = 0; i < _projections.size(); i++) {
625
903
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
903
        }
627
290
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
291
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
290
    }
636
69.6k
    return Status::OK();
637
69.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
61
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
61
    _conjuncts.resize(_parent->_conjuncts.size());
618
61
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
61
    if (_parent->has_projection()) {
622
1
        const auto& projection = *_parent->_projection;
623
1
        _projections.resize(projection.projections.size());
624
3
        for (size_t i = 0; i < _projections.size(); i++) {
625
2
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2
        }
627
1
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
1
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
1
    }
636
61
    return Status::OK();
637
61
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
836k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
836k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.14M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
836k
    if (_parent->has_projection()) {
622
271k
        const auto& projection = *_parent->_projection;
623
271k
        _projections.resize(projection.projections.size());
624
1.61M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.34M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.34M
        }
627
271k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
286k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
85.3k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
70.5k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
70.5k
                        state, _intermediate_projections[i][j]));
633
70.5k
            }
634
14.8k
        }
635
271k
    }
636
836k
    return Status::OK();
637
836k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.8k
    if (_parent->has_projection()) {
622
12.0k
        const auto& projection = *_parent->_projection;
623
12.0k
        _projections.resize(projection.projections.size());
624
116k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
12.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
106
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.67k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.56k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.56k
                        state, _intermediate_projections[i][j]));
633
1.56k
            }
634
106
        }
635
12.0k
    }
636
56.8k
    return Status::OK();
637
56.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.11k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.11k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.36k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
243
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
243
    }
621
5.11k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
5.11k
    return Status::OK();
637
5.11k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
411
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
411
    _conjuncts.resize(_parent->_conjuncts.size());
618
411
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
411
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
411
    return Status::OK();
637
411
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.36k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.36k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.36k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.36k
    if (_parent->has_projection()) {
622
90
        const auto& projection = *_parent->_projection;
623
90
        _projections.resize(projection.projections.size());
624
291
        for (size_t i = 0; i < _projections.size(); i++) {
625
201
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
201
        }
627
90
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
90
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
90
    }
636
5.36k
    return Status::OK();
637
5.36k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
674k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
674k
    _conjuncts.resize(_parent->_conjuncts.size());
618
674k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
674k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
674k
    return Status::OK();
637
674k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
10.3k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10.3k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10.3k
    _terminated = true;
645
10.3k
    return Status::OK();
646
10.3k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
361
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
361
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
361
    _terminated = true;
645
361
    return Status::OK();
646
361
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
29
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
29
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
29
    _terminated = true;
645
29
    return Status::OK();
646
29
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7
    _terminated = true;
645
7
    return Status::OK();
646
7
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
99
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
99
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
99
    _terminated = true;
645
99
    return Status::OK();
646
99
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
8.39k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.39k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.39k
    _terminated = true;
645
8.39k
    return Status::OK();
646
8.39k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
52
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
52
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
52
    _terminated = true;
645
52
    return Status::OK();
646
52
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
291
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
291
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
291
    _terminated = true;
645
291
    return Status::OK();
646
291
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.03k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.03k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.03k
    _terminated = true;
645
1.03k
    return Status::OK();
646
1.03k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
34
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
34
    _terminated = true;
645
34
    return Status::OK();
646
34
}
647
648
template <typename SharedStateArg>
649
2.34M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.34M
    if (_closed) {
651
264k
        return Status::OK();
652
264k
    }
653
2.08M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.24M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.24M
    }
656
2.08M
    _closed = true;
657
2.08M
    return Status::OK();
658
2.34M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
79.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
79.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
79.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
79.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
79.0k
    }
656
79.0k
    _closed = true;
657
79.0k
    return Status::OK();
658
79.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
463k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
463k
    if (_closed) {
651
232k
        return Status::OK();
652
232k
    }
653
231k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
231k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
231k
    }
656
231k
    _closed = true;
657
231k
    return Status::OK();
658
463k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
39
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
39
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
39
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
39
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
39
    }
656
39
    _closed = true;
657
39
    return Status::OK();
658
39
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
8.63k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
8.63k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
8.63k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.63k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.63k
    }
656
8.63k
    _closed = true;
657
8.63k
    return Status::OK();
658
8.63k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
19.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
19.0k
    if (_closed) {
651
9.62k
        return Status::OK();
652
9.62k
    }
653
9.42k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.42k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.42k
    }
656
9.42k
    _closed = true;
657
9.42k
    return Status::OK();
658
19.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
105k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
105k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
105k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
105k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
105k
    }
656
105k
    _closed = true;
657
105k
    return Status::OK();
658
105k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
69.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
69.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
69.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
69.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
69.3k
    }
656
69.3k
    _closed = true;
657
69.3k
    return Status::OK();
658
69.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56
    }
656
56
    _closed = true;
657
56
    return Status::OK();
658
56
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
852k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
852k
    if (_closed) {
651
15.7k
        return Status::OK();
652
15.7k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
837k
    _closed = true;
657
837k
    return Status::OK();
658
852k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.8k
    }
656
56.8k
    _closed = true;
657
56.8k
    return Status::OK();
658
56.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.12k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.12k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.12k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.12k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.12k
    }
656
5.12k
    _closed = true;
657
5.12k
    return Status::OK();
658
5.12k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
617
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
617
    if (_closed) {
651
308
        return Status::OK();
652
308
    }
653
309
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
309
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
309
    }
656
309
    _closed = true;
657
309
    return Status::OK();
658
617
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.3k
    if (_closed) {
651
5.99k
        return Status::OK();
652
5.99k
    }
653
5.35k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.35k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.35k
    }
656
5.35k
    _closed = true;
657
5.35k
    return Status::OK();
658
11.3k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
676k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
676k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
676k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
676k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
676k
    }
656
676k
    _closed = true;
657
676k
    return Status::OK();
658
676k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
335
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
335
    if (_closed) {
651
175
        return Status::OK();
652
175
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
335
}
659
660
template <typename SharedState>
661
1.78M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.78M
    _operator_profile =
664
1.78M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.78M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.78M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.78M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.78M
    _operator_profile->add_child(_common_profile, true);
673
1.78M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.78M
    _operator_profile->set_metadata(_parent->node_id());
676
1.78M
    _wait_for_finish_dependency_timer =
677
1.78M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.78M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.78M
    if constexpr (!is_fake_shared) {
680
1.25M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.25M
            info.shared_state_map.end()) {
682
348k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
260k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
260k
            }
685
348k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
348k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
348k
                                                  ? 0
688
348k
                                                  : info.task_idx]
689
348k
                                  .get();
690
348k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
905k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
905k
            _shared_state = info.shared_state->template cast<SharedState>();
696
905k
            _dependency = _shared_state->create_sink_dependency(
697
905k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
905k
        }
699
1.25M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.25M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.25M
    }
702
703
1.78M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.78M
    _rows_input_counter =
708
1.78M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.78M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.78M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.78M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.78M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.78M
    _memory_used_counter =
714
1.78M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.78M
    _common_profile->add_info_string("IsColocate",
716
1.78M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.78M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.78M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.78M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.78M
    return Status::OK();
721
1.78M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
126k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
126k
    _operator_profile =
664
126k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
126k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
126k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
126k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
126k
    _operator_profile->add_child(_common_profile, true);
673
126k
    _operator_profile->add_child(_custom_profile, true);
674
675
126k
    _operator_profile->set_metadata(_parent->node_id());
676
126k
    _wait_for_finish_dependency_timer =
677
126k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
126k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
126k
    if constexpr (!is_fake_shared) {
680
126k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
126k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
18.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
18.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
18.9k
                                                  ? 0
688
18.9k
                                                  : info.task_idx]
689
18.9k
                                  .get();
690
18.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
107k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
107k
            _shared_state = info.shared_state->template cast<SharedState>();
696
107k
            _dependency = _shared_state->create_sink_dependency(
697
107k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
107k
        }
699
126k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
126k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
126k
    }
702
703
126k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
126k
    _rows_input_counter =
708
126k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
126k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
126k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
126k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
126k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
126k
    _memory_used_counter =
714
126k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
126k
    _common_profile->add_info_string("IsColocate",
716
126k
                                     std::to_string(_parent->is_colocated_operator()));
717
126k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
126k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
126k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
126k
    return Status::OK();
721
126k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
232k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
232k
    _operator_profile =
664
232k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
232k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
232k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
232k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
232k
    _operator_profile->add_child(_common_profile, true);
673
232k
    _operator_profile->add_child(_custom_profile, true);
674
675
232k
    _operator_profile->set_metadata(_parent->node_id());
676
232k
    _wait_for_finish_dependency_timer =
677
232k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
232k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
232k
    if constexpr (!is_fake_shared) {
680
232k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
232k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
232k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
232k
            _shared_state = info.shared_state->template cast<SharedState>();
696
232k
            _dependency = _shared_state->create_sink_dependency(
697
232k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
232k
        }
699
232k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
232k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
232k
    }
702
703
232k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
232k
    _rows_input_counter =
708
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
232k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
232k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
232k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
232k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
232k
    _memory_used_counter =
714
232k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
232k
    _common_profile->add_info_string("IsColocate",
716
232k
                                     std::to_string(_parent->is_colocated_operator()));
717
232k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
232k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
232k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
232k
    return Status::OK();
721
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
46
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
46
    _operator_profile =
664
46
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
46
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
46
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
46
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
46
    _operator_profile->add_child(_common_profile, true);
673
46
    _operator_profile->add_child(_custom_profile, true);
674
675
46
    _operator_profile->set_metadata(_parent->node_id());
676
46
    _wait_for_finish_dependency_timer =
677
46
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
46
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
46
    if constexpr (!is_fake_shared) {
680
46
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
46
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
46
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
46
            _shared_state = info.shared_state->template cast<SharedState>();
696
46
            _dependency = _shared_state->create_sink_dependency(
697
46
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
46
        }
699
46
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
46
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
46
    }
702
703
46
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
46
    _rows_input_counter =
708
46
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
46
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
46
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
46
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
46
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
46
    _memory_used_counter =
714
46
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
46
    _common_profile->add_info_string("IsColocate",
716
46
                                     std::to_string(_parent->is_colocated_operator()));
717
46
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
46
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
46
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
46
    return Status::OK();
721
46
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.56k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.56k
    _operator_profile =
664
8.56k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.56k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.56k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.56k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.56k
    _operator_profile->add_child(_common_profile, true);
673
8.56k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.56k
    _operator_profile->set_metadata(_parent->node_id());
676
8.56k
    _wait_for_finish_dependency_timer =
677
8.56k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.56k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.56k
    if constexpr (!is_fake_shared) {
680
8.56k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.56k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.56k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.56k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.56k
            _dependency = _shared_state->create_sink_dependency(
697
8.56k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.56k
        }
699
8.56k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.56k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.56k
    }
702
703
8.56k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.56k
    _rows_input_counter =
708
8.56k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.56k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.56k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.56k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.56k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.56k
    _memory_used_counter =
714
8.56k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.56k
    _common_profile->add_info_string("IsColocate",
716
8.56k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.56k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.56k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.56k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.56k
    return Status::OK();
721
8.56k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.43k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.43k
    _operator_profile =
664
9.43k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.43k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.43k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.43k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.43k
    _operator_profile->add_child(_common_profile, true);
673
9.43k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.43k
    _operator_profile->set_metadata(_parent->node_id());
676
9.43k
    _wait_for_finish_dependency_timer =
677
9.43k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.43k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.43k
    if constexpr (!is_fake_shared) {
680
9.43k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.43k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.43k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.43k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.43k
            _dependency = _shared_state->create_sink_dependency(
697
9.43k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.43k
        }
699
9.43k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.43k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.43k
    }
702
703
9.43k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.43k
    _rows_input_counter =
708
9.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.43k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.43k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.43k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.43k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.43k
    _memory_used_counter =
714
9.43k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.43k
    _common_profile->add_info_string("IsColocate",
716
9.43k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.43k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.43k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.43k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.43k
    return Status::OK();
721
9.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
105k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
105k
    _operator_profile =
664
105k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
105k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
105k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
105k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
105k
    _operator_profile->add_child(_common_profile, true);
673
105k
    _operator_profile->add_child(_custom_profile, true);
674
675
105k
    _operator_profile->set_metadata(_parent->node_id());
676
105k
    _wait_for_finish_dependency_timer =
677
105k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
105k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
105k
    if constexpr (!is_fake_shared) {
680
105k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
105k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
105k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
105k
            _shared_state = info.shared_state->template cast<SharedState>();
696
105k
            _dependency = _shared_state->create_sink_dependency(
697
105k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
105k
        }
699
105k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
105k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
105k
    }
702
703
105k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
105k
    _rows_input_counter =
708
105k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
105k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
105k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
105k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
105k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
105k
    _memory_used_counter =
714
105k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
105k
    _common_profile->add_info_string("IsColocate",
716
105k
                                     std::to_string(_parent->is_colocated_operator()));
717
105k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
105k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
105k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
105k
    return Status::OK();
721
105k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
69.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
69.4k
    _operator_profile =
664
69.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
69.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
69.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
69.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
69.4k
    _operator_profile->add_child(_common_profile, true);
673
69.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
69.4k
    _operator_profile->set_metadata(_parent->node_id());
676
69.4k
    _wait_for_finish_dependency_timer =
677
69.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
69.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
69.4k
    if constexpr (!is_fake_shared) {
680
69.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
69.5k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
69.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
69.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
69.5k
                                                  ? 0
688
69.5k
                                                  : info.task_idx]
689
69.5k
                                  .get();
690
69.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
69.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
69.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
69.4k
    }
702
703
69.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
69.4k
    _rows_input_counter =
708
69.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
69.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
69.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
69.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
69.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
69.4k
    _memory_used_counter =
714
69.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
69.4k
    _common_profile->add_info_string("IsColocate",
716
69.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
69.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
69.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
69.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
69.4k
    return Status::OK();
721
69.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
67
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
67
    _operator_profile =
664
67
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
67
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
67
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
67
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
67
    _operator_profile->add_child(_common_profile, true);
673
67
    _operator_profile->add_child(_custom_profile, true);
674
675
67
    _operator_profile->set_metadata(_parent->node_id());
676
67
    _wait_for_finish_dependency_timer =
677
67
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
67
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
67
    if constexpr (!is_fake_shared) {
680
67
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
67
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
67
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
67
            _shared_state = info.shared_state->template cast<SharedState>();
696
67
            _dependency = _shared_state->create_sink_dependency(
697
67
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
67
        }
699
67
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
67
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
67
    }
702
703
67
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
67
    _rows_input_counter =
708
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
67
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
67
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
67
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
67
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
67
    _memory_used_counter =
714
67
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
67
    _common_profile->add_info_string("IsColocate",
716
67
                                     std::to_string(_parent->is_colocated_operator()));
717
67
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
67
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
67
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
67
    return Status::OK();
721
67
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
526k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
526k
    _operator_profile =
664
526k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
526k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
526k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
526k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
526k
    _operator_profile->add_child(_common_profile, true);
673
526k
    _operator_profile->add_child(_custom_profile, true);
674
675
526k
    _operator_profile->set_metadata(_parent->node_id());
676
526k
    _wait_for_finish_dependency_timer =
677
526k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
526k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
526k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
526k
    _rows_input_counter =
708
526k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
526k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
526k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
526k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
526k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
526k
    _memory_used_counter =
714
526k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
526k
    _common_profile->add_info_string("IsColocate",
716
526k
                                     std::to_string(_parent->is_colocated_operator()));
717
526k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
526k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
526k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
526k
    return Status::OK();
721
526k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.8k
    _operator_profile =
664
10.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.8k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
10.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.8k
    _operator_profile->add_child(_common_profile, true);
673
10.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.8k
    _operator_profile->set_metadata(_parent->node_id());
676
10.8k
    _wait_for_finish_dependency_timer =
677
10.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.8k
    if constexpr (!is_fake_shared) {
680
10.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.8k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.8k
            _dependency = _shared_state->create_sink_dependency(
697
10.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.8k
        }
699
10.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.8k
    }
702
703
10.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
10.8k
    _rows_input_counter =
708
10.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.8k
    _memory_used_counter =
714
10.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.8k
    _common_profile->add_info_string("IsColocate",
716
10.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.8k
    return Status::OK();
721
10.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
410
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
410
    _operator_profile =
664
410
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
410
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
410
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
410
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
410
    _operator_profile->add_child(_common_profile, true);
673
410
    _operator_profile->add_child(_custom_profile, true);
674
675
410
    _operator_profile->set_metadata(_parent->node_id());
676
410
    _wait_for_finish_dependency_timer =
677
410
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
410
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
410
    if constexpr (!is_fake_shared) {
680
410
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
410
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
410
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
410
            _shared_state = info.shared_state->template cast<SharedState>();
696
410
            _dependency = _shared_state->create_sink_dependency(
697
410
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
410
        }
699
410
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
410
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
410
    }
702
703
411
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
410
    _rows_input_counter =
708
410
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
410
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
410
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
410
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
410
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
410
    _memory_used_counter =
714
410
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
410
    _common_profile->add_info_string("IsColocate",
716
410
                                     std::to_string(_parent->is_colocated_operator()));
717
410
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
410
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
410
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
410
    return Status::OK();
721
410
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.15k
    _operator_profile =
664
2.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.15k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.15k
    _operator_profile->add_child(_common_profile, true);
673
2.15k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.15k
    _operator_profile->set_metadata(_parent->node_id());
676
2.15k
    _wait_for_finish_dependency_timer =
677
2.15k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.15k
    if constexpr (!is_fake_shared) {
680
2.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.15k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.15k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.15k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.15k
            _dependency = _shared_state->create_sink_dependency(
697
2.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.15k
        }
699
2.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.15k
    }
702
703
2.15k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.15k
    _rows_input_counter =
708
2.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.15k
    _memory_used_counter =
714
2.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.15k
    _common_profile->add_info_string("IsColocate",
716
2.15k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.15k
    return Status::OK();
721
2.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.9k
    _operator_profile =
664
12.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.9k
    _operator_profile->add_child(_common_profile, true);
673
12.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.9k
    _operator_profile->set_metadata(_parent->node_id());
676
12.9k
    _wait_for_finish_dependency_timer =
677
12.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.9k
    if constexpr (!is_fake_shared) {
680
12.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.9k
            _dependency = _shared_state->create_sink_dependency(
697
12.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.9k
        }
699
12.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.9k
    }
702
703
12.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.9k
    _rows_input_counter =
708
12.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.9k
    _memory_used_counter =
714
12.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.9k
    _common_profile->add_info_string("IsColocate",
716
12.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.9k
    return Status::OK();
721
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
259k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
259k
    _operator_profile =
664
259k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
259k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
259k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
259k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
259k
    _operator_profile->add_child(_common_profile, true);
673
259k
    _operator_profile->add_child(_custom_profile, true);
674
675
259k
    _operator_profile->set_metadata(_parent->node_id());
676
259k
    _wait_for_finish_dependency_timer =
677
259k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
259k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
259k
    if constexpr (!is_fake_shared) {
680
259k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
260k
            info.shared_state_map.end()) {
682
260k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
260k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
260k
            }
685
260k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
260k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
260k
                                                  ? 0
688
260k
                                                  : info.task_idx]
689
260k
                                  .get();
690
260k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
259k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
259k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
259k
    }
702
703
259k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
259k
    _rows_input_counter =
708
259k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
259k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
259k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
259k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
259k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
259k
    _memory_used_counter =
714
259k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
259k
    _common_profile->add_info_string("IsColocate",
716
259k
                                     std::to_string(_parent->is_colocated_operator()));
717
259k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
259k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
259k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
259k
    return Status::OK();
721
259k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
415k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
415k
    _operator_profile =
664
415k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
415k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
415k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
415k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
415k
    _operator_profile->add_child(_common_profile, true);
673
415k
    _operator_profile->add_child(_custom_profile, true);
674
675
415k
    _operator_profile->set_metadata(_parent->node_id());
676
415k
    _wait_for_finish_dependency_timer =
677
415k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
415k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
415k
    if constexpr (!is_fake_shared) {
680
415k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
415k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
415k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
415k
            _shared_state = info.shared_state->template cast<SharedState>();
696
415k
            _dependency = _shared_state->create_sink_dependency(
697
415k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
415k
        }
699
415k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
415k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
415k
    }
702
703
415k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
415k
    _rows_input_counter =
708
415k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
415k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
415k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
415k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
415k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
415k
    _memory_used_counter =
714
415k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
415k
    _common_profile->add_info_string("IsColocate",
716
415k
                                     std::to_string(_parent->is_colocated_operator()));
717
415k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
415k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
415k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
415k
    return Status::OK();
721
415k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.78M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.78M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.78M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.25M
    }
731
1.78M
    _closed = true;
732
1.78M
    return Status::OK();
733
1.78M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
126k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
126k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
126k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
126k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
126k
    }
731
126k
    _closed = true;
732
126k
    return Status::OK();
733
126k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
232k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
232k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
232k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
232k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
232k
    }
731
232k
    _closed = true;
732
232k
    return Status::OK();
733
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
37
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
37
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
35
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
35
    }
731
35
    _closed = true;
732
35
    return Status::OK();
733
37
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.60k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.60k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.60k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.60k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.60k
    }
731
8.60k
    _closed = true;
732
8.60k
    return Status::OK();
733
8.60k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.40k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.40k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.40k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.40k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.40k
    }
731
9.40k
    _closed = true;
732
9.40k
    return Status::OK();
733
9.40k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
104k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
104k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
104k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
104k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
104k
    }
731
104k
    _closed = true;
732
104k
    return Status::OK();
733
104k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
69.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
69.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
69.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
69.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
69.3k
    }
731
69.3k
    _closed = true;
732
69.3k
    return Status::OK();
733
69.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
56
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
56
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
56
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
56
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
56
    }
731
56
    _closed = true;
732
56
    return Status::OK();
733
56
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
530k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
530k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
530k
    _closed = true;
732
530k
    return Status::OK();
733
530k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.9k
    }
731
10.9k
    _closed = true;
732
10.9k
    return Status::OK();
733
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
308
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
308
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
308
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
308
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
308
    }
731
308
    _closed = true;
732
308
    return Status::OK();
733
308
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.17k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.17k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.17k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.17k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.17k
    }
731
2.17k
    _closed = true;
732
2.17k
    return Status::OK();
733
2.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.0k
    }
731
13.0k
    _closed = true;
732
13.0k
    return Status::OK();
733
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
261k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
261k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
261k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
261k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
261k
    }
731
261k
    _closed = true;
732
261k
    return Status::OK();
733
261k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
416k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
416k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
416k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
416k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
416k
    }
731
416k
    _closed = true;
732
416k
    return Status::OK();
733
416k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.53k
                                                          bool* eos) {
738
1.53k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.52k
    return pull(state, block, eos);
740
1.53k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
40
                                                          bool* eos) {
738
40
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
40
    return pull(state, block, eos);
740
40
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.49k
                                                          bool* eos) {
738
1.49k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.48k
    return pull(state, block, eos);
740
1.49k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
496k
                                                         bool* eos) {
745
496k
    auto& local_state = get_local_state(state);
746
496k
    if (need_more_input_data(state)) {
747
463k
        local_state._child_block->clear_column_data(
748
463k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
463k
                        .num_slots());
750
463k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
463k
                state, local_state._child_block.get(), &local_state._child_eos));
752
463k
        *eos = local_state._child_eos;
753
463k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
54.6k
            return Status::OK();
755
54.6k
        }
756
408k
        {
757
408k
            SCOPED_TIMER(local_state.exec_time_counter());
758
408k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
408k
        }
760
408k
    }
761
762
441k
    if (!need_more_input_data(state)) {
763
416k
        SCOPED_TIMER(local_state.exec_time_counter());
764
416k
        bool new_eos = false;
765
416k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
416k
        if (new_eos) {
767
339k
            *eos = true;
768
339k
        } else if (!need_more_input_data(state)) {
769
24.5k
            *eos = false;
770
24.5k
        }
771
416k
    }
772
441k
    return Status::OK();
773
441k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
144k
                                                         bool* eos) {
745
144k
    auto& local_state = get_local_state(state);
746
144k
    if (need_more_input_data(state)) {
747
123k
        local_state._child_block->clear_column_data(
748
123k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
123k
                        .num_slots());
750
123k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
123k
                state, local_state._child_block.get(), &local_state._child_eos));
752
123k
        *eos = local_state._child_eos;
753
123k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
33.9k
            return Status::OK();
755
33.9k
        }
756
89.8k
        {
757
89.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
89.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
89.8k
        }
760
89.8k
    }
761
762
110k
    if (!need_more_input_data(state)) {
763
110k
        SCOPED_TIMER(local_state.exec_time_counter());
764
110k
        bool new_eos = false;
765
110k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
110k
        if (new_eos) {
767
54.5k
            *eos = true;
768
56.0k
        } else if (!need_more_input_data(state)) {
769
11.5k
            *eos = false;
770
11.5k
        }
771
110k
    }
772
110k
    return Status::OK();
773
110k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.34k
                                                         bool* eos) {
745
4.34k
    auto& local_state = get_local_state(state);
746
4.34k
    if (need_more_input_data(state)) {
747
2.41k
        local_state._child_block->clear_column_data(
748
2.41k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.41k
                        .num_slots());
750
2.41k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.41k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.41k
        *eos = local_state._child_eos;
753
2.41k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
549
            return Status::OK();
755
549
        }
756
1.86k
        {
757
1.86k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.86k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.86k
        }
760
1.86k
    }
761
762
3.81k
    if (!need_more_input_data(state)) {
763
3.81k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.81k
        bool new_eos = false;
765
3.81k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.81k
        if (new_eos) {
767
1.30k
            *eos = true;
768
2.50k
        } else if (!need_more_input_data(state)) {
769
1.92k
            *eos = false;
770
1.92k
        }
771
3.81k
    }
772
3.79k
    return Status::OK();
773
3.79k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.93k
                                                         bool* eos) {
745
1.93k
    auto& local_state = get_local_state(state);
746
1.93k
    if (need_more_input_data(state)) {
747
1.93k
        local_state._child_block->clear_column_data(
748
1.93k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.93k
                        .num_slots());
750
1.93k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.93k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.93k
        *eos = local_state._child_eos;
753
1.93k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
776
            return Status::OK();
755
776
        }
756
1.16k
        {
757
1.16k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.16k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.16k
        }
760
1.16k
    }
761
762
1.16k
    if (!need_more_input_data(state)) {
763
1.16k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.16k
        bool new_eos = false;
765
1.16k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.16k
        if (new_eos) {
767
796
            *eos = true;
768
796
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.16k
    }
772
1.16k
    return Status::OK();
773
1.16k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
19.8k
                                                         bool* eos) {
745
19.8k
    auto& local_state = get_local_state(state);
746
19.8k
    if (need_more_input_data(state)) {
747
19.7k
        local_state._child_block->clear_column_data(
748
19.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
19.7k
                        .num_slots());
750
19.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
19.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
19.7k
        *eos = local_state._child_eos;
753
19.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
5.37k
            return Status::OK();
755
5.37k
        }
756
14.4k
        {
757
14.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.4k
        }
760
14.4k
    }
761
762
14.4k
    if (!need_more_input_data(state)) {
763
7.21k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.21k
        bool new_eos = false;
765
7.21k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.21k
        if (new_eos) {
767
7.08k
            *eos = true;
768
7.08k
        } else if (!need_more_input_data(state)) {
769
10
            *eos = false;
770
10
        }
771
7.21k
    }
772
14.4k
    return Status::OK();
773
14.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
293k
                                                         bool* eos) {
745
293k
    auto& local_state = get_local_state(state);
746
294k
    if (need_more_input_data(state)) {
747
294k
        local_state._child_block->clear_column_data(
748
294k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
294k
                        .num_slots());
750
294k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
294k
                state, local_state._child_block.get(), &local_state._child_eos));
752
294k
        *eos = local_state._child_eos;
753
294k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
12.8k
            return Status::OK();
755
12.8k
        }
756
281k
        {
757
281k
            SCOPED_TIMER(local_state.exec_time_counter());
758
281k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
281k
        }
760
281k
    }
761
762
281k
    if (!need_more_input_data(state)) {
763
262k
        SCOPED_TIMER(local_state.exec_time_counter());
764
262k
        bool new_eos = false;
765
262k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
262k
        if (new_eos) {
767
261k
            *eos = true;
768
261k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
262k
    }
772
281k
    return Status::OK();
773
281k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
24.2k
                                                         bool* eos) {
745
24.2k
    auto& local_state = get_local_state(state);
746
24.2k
    if (need_more_input_data(state)) {
747
13.5k
        local_state._child_block->clear_column_data(
748
13.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
13.5k
                        .num_slots());
750
13.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
13.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
13.5k
        *eos = local_state._child_eos;
753
13.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
379
            return Status::OK();
755
379
        }
756
13.1k
        {
757
13.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.1k
        }
760
13.1k
    }
761
762
23.8k
    if (!need_more_input_data(state)) {
763
23.3k
        SCOPED_TIMER(local_state.exec_time_counter());
764
23.3k
        bool new_eos = false;
765
23.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
23.3k
        if (new_eos) {
767
8.62k
            *eos = true;
768
14.7k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
23.3k
    }
772
23.8k
    return Status::OK();
773
23.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.85k
                                                         bool* eos) {
745
7.85k
    auto& local_state = get_local_state(state);
746
7.85k
    if (need_more_input_data(state)) {
747
7.49k
        local_state._child_block->clear_column_data(
748
7.49k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.49k
                        .num_slots());
750
7.49k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.49k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.49k
        *eos = local_state._child_eos;
753
7.49k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
807
            return Status::OK();
755
807
        }
756
6.68k
        {
757
6.68k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.68k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.68k
        }
760
6.68k
    }
761
762
7.04k
    if (!need_more_input_data(state)) {
763
7.04k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.04k
        bool new_eos = false;
765
7.04k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.04k
        if (new_eos) {
767
4.89k
            *eos = true;
768
4.89k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.04k
    }
772
7.04k
    return Status::OK();
773
7.04k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
50.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.1k
                                                         "AsyncWriterDependency", true);
781
50.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.1k
                             _finish_dependency));
783
784
50.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.1k
    return Status::OK();
787
50.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
376
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
376
    RETURN_IF_ERROR(Base::init(state, info));
779
376
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
376
                                                         "AsyncWriterDependency", true);
781
376
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
376
                             _finish_dependency));
783
784
376
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
376
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
376
    return Status::OK();
787
376
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.7k
                                                         "AsyncWriterDependency", true);
781
49.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.7k
                             _finish_dependency));
783
784
49.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.7k
    return Status::OK();
787
49.7k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.8k
    RETURN_IF_ERROR(Base::open(state));
793
50.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
336k
        RETURN_IF_ERROR(
796
336k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
336k
    }
798
50.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.8k
    return Status::OK();
800
50.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
377
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
377
    RETURN_IF_ERROR(Base::open(state));
793
377
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.89k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.52k
        RETURN_IF_ERROR(
796
1.52k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.52k
    }
798
377
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
377
    return Status::OK();
800
377
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
50.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.4k
    RETURN_IF_ERROR(Base::open(state));
793
50.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
385k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
334k
        RETURN_IF_ERROR(
796
334k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
334k
    }
798
50.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.4k
    return Status::OK();
800
50.4k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.9k
    return _writer->sink(block, eos);
806
66.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.68k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.68k
    return _writer->sink(block, eos);
806
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
65.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.1k
    return _writer->sink(block, eos);
806
65.1k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.9k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.9k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.9k
    if (_writer) {
818
50.9k
        Status st = _writer->get_writer_status();
819
50.9k
        if (exec_status.ok()) {
820
50.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.9k
                                                       : Status::Cancelled("force close"));
822
50.9k
        } else {
823
88
            _writer->force_close(exec_status);
824
88
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.9k
        RETURN_IF_ERROR(st);
829
50.9k
    }
830
50.9k
    return Base::close(state, exec_status);
831
50.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
366
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
366
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
366
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
366
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
366
    if (_writer) {
818
366
        Status st = _writer->get_writer_status();
819
366
        if (exec_status.ok()) {
820
366
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
366
                                                       : Status::Cancelled("force close"));
822
366
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
366
        RETURN_IF_ERROR(st);
829
366
    }
830
366
    return Base::close(state, exec_status);
831
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.5k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.6k
    if (_writer) {
818
50.6k
        Status st = _writer->get_writer_status();
819
50.6k
        if (exec_status.ok()) {
820
50.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.5k
                                                       : Status::Cancelled("force close"));
822
50.5k
        } else {
823
88
            _writer->force_close(exec_status);
824
88
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.6k
        RETURN_IF_ERROR(st);
829
50.6k
    }
830
50.5k
    return Base::close(state, exec_status);
831
50.5k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
977
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
978
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
979
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
980
981
#ifdef BE_TEST
982
template class OperatorX<DummyOperatorLocalState>;
983
template class DataSinkOperatorX<DummySinkLocalState>;
984
#endif
985
986
} // namespace doris