Coverage Report

Created: 2026-09-05 06:46

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.64M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.64M
    if (_parent->nereids_id() == -1) {
122
876k
        return fmt::format("(id={})", _parent->node_id());
123
876k
    } else {
124
764k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
764k
    }
126
1.64M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.6k
    } else {
124
68.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.6k
    }
126
68.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
158k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
158k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
158k
    } else {
124
158k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
158k
    }
126
158k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
23
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
23
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
23
    } else {
124
23
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
23
    }
126
23
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
7.88k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
7.88k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
7.88k
    } else {
124
7.88k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
7.88k
    }
126
7.88k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.70k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.70k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
8.69k
    } else {
124
8.69k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.69k
    }
126
8.70k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
88.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
88.6k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
88.6k
    } else {
124
88.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
88.6k
    }
126
88.6k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
66.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
66.3k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
66.3k
    } else {
124
66.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
66.3k
    }
126
66.3k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
154
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
154
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
154
    } else {
124
154
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
154
    }
126
154
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
571k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
571k
    if (_parent->nereids_id() == -1) {
122
265k
        return fmt::format("(id={})", _parent->node_id());
123
306k
    } else {
124
306k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
306k
    }
126
571k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
53.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
53.9k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
53.9k
    } else {
124
53.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
53.9k
    }
126
53.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.98k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.98k
    if (_parent->nereids_id() == -1) {
122
5.98k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
5.98k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
476
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
476
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
374
    } else {
124
374
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
374
    }
126
476
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.23k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.23k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.22k
    } else {
124
5.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.22k
    }
126
5.23k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
604k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
604k
    if (_parent->nereids_id() == -1) {
122
603k
        return fmt::format("(id={})", _parent->node_id());
123
603k
    } else {
124
146
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
146
    }
126
604k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.14M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.14M
    if (_parent->nereids_id() == -1) {
131
682k
        return fmt::format("(id={})", _parent->node_id());
132
682k
    } else {
133
458k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
458k
    }
135
1.14M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
117k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
117k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
117k
    } else {
133
117k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
117k
    }
135
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
159k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
159k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
159k
    } else {
133
159k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
159k
    }
135
159k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
30
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
30
    } else {
133
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
30
    }
135
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.90k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.90k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
7.90k
    } else {
133
7.90k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.90k
    }
135
7.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.74k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.74k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
8.73k
    } else {
133
8.73k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.73k
    }
135
8.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
88.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
88.6k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
88.5k
    } else {
133
88.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
88.5k
    }
135
88.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
66.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
66.2k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
66.2k
    } else {
133
66.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
66.2k
    }
135
66.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
164
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
164
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
164
    } else {
133
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
164
    }
135
164
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
12
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
12
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
9.63k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
9.63k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
9.62k
    } else {
133
9.62k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
9.62k
    }
135
9.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
490
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
490
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
388
    } else {
133
388
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
388
    }
135
490
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.7k
    if (_parent->nereids_id() == -1) {
131
12.7k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
271k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
272k
    if (_parent->nereids_id() == -1) {
131
272k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
271k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
396k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
397k
    if (_parent->nereids_id() == -1) {
131
397k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
396k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
29.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
29.8k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
29.8k
    _terminated = true;
143
29.8k
    return Status::OK();
144
29.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.80k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.80k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.80k
    _terminated = true;
143
1.80k
    return Status::OK();
144
1.80k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.58k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.58k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.58k
    _terminated = true;
143
1.58k
    return Status::OK();
144
1.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
819
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
819
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
819
    _terminated = true;
143
819
    return Status::OK();
144
819
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
499
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
499
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
499
    _terminated = true;
143
499
    return Status::OK();
144
499
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
313
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
313
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
313
    _terminated = true;
143
313
    return Status::OK();
144
313
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
6
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
6
    _terminated = true;
143
6
    return Status::OK();
144
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
253
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
253
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
253
    _terminated = true;
143
253
    return Status::OK();
144
253
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
340
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
340
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
340
    _terminated = true;
143
340
    return Status::OK();
144
340
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
131
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
131
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
131
    _terminated = true;
143
131
    return Status::OK();
144
131
}
145
146
303k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
303k
    return _child && _child->is_serial_operator() && !is_source()
148
303k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
303k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
303k
}
151
152
24.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
24.3k
    if (!_child) {
154
23.0k
        return false;
155
23.0k
    }
156
1.23k
    if (_child->is_serial_operator()) {
157
197
        return true;
158
197
    }
159
1.03k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.03k
    return child_distribution.need_local_exchange() &&
161
1.03k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.23k
}
163
164
template <typename SharedStateArg>
165
19.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.2k
    fmt::memory_buffer debug_string_buffer;
167
19.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.2k
    return fmt::to_string(debug_string_buffer);
169
19.2k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
19.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.2k
    fmt::memory_buffer debug_string_buffer;
167
19.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.2k
    return fmt::to_string(debug_string_buffer);
169
19.2k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
19.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.2k
    fmt::memory_buffer debug_string_buffer;
174
19.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.2k
    return fmt::to_string(debug_string_buffer);
176
19.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
19.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.2k
    fmt::memory_buffer debug_string_buffer;
174
19.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.2k
    return fmt::to_string(debug_string_buffer);
176
19.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
19.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
19.3k
    fmt::memory_buffer debug_string_buffer;
180
19.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
19.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
19.3k
                   _is_serial_operator);
183
19.3k
    return fmt::to_string(debug_string_buffer);
184
19.3k
}
185
186
19.2k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
19.2k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
19.2k
}
189
190
634k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
634k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
634k
    _nereids_id = tnode.nereids_id;
193
634k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.60k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.60k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.60k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.60k
    }
206
634k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
634k
    _op_name = substr + "_OPERATOR";
208
209
634k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
634k
    } else if (tnode.__isset.conjuncts) {
212
262k
        for (const auto& conjunct : tnode.conjuncts) {
213
262k
            VExprContextSPtr context;
214
262k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
262k
            _conjuncts.emplace_back(context);
216
262k
        }
217
91.8k
    }
218
219
    // create the projections expr
220
634k
    if (tnode.__isset.projections) {
221
245k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
245k
    }
223
634k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.60k
        DCHECK(has_projection()) << "no final projections";
225
3.60k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
5.84k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
5.84k
            VExprContextSPtrs projections;
228
5.84k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
5.84k
            _projection->intermediate_projections.push_back(projections);
230
5.84k
        }
231
3.60k
    }
232
634k
    return Status::OK();
233
634k
}
234
235
661k
Status OperatorXBase::prepare(RuntimeState* state) {
236
661k
    for (auto& conjunct : _conjuncts) {
237
262k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
262k
    }
239
661k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
611k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
334k
            return a->execute_cost() < b->execute_cost();
242
334k
        });
243
611k
    };
244
245
661k
    if (has_projection()) {
246
245k
        auto& projection = *_projection;
247
250k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
5.84k
            const auto& input_row_desc =
249
5.84k
                    i == 0 ? operator_row_desc_before_projection()
250
5.84k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
5.84k
            RETURN_IF_ERROR(
252
5.84k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
5.84k
        }
254
245k
        const auto& final_projection_input_row_desc =
255
245k
                projection.intermediate_output_row_descriptors.empty()
256
245k
                        ? operator_row_desc_before_projection()
257
245k
                        : projection.intermediate_output_row_descriptors.back();
258
245k
        RETURN_IF_ERROR(
259
245k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
245k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
245k
                                                      projection.output_row_descriptor));
262
245k
    }
263
264
661k
    for (auto& conjunct : _conjuncts) {
265
262k
        RETURN_IF_ERROR(conjunct->open(state));
266
262k
    }
267
661k
    if (has_projection()) {
268
245k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
245k
        for (auto& projections : _projection->intermediate_projections) {
270
5.84k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
5.84k
        }
272
245k
    }
273
661k
    if (_child && !is_source()) {
274
99.6k
        RETURN_IF_ERROR(_child->prepare(state));
275
99.6k
    }
276
277
661k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
661k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
661k
    return Status::OK();
283
661k
}
284
285
6.55k
Status OperatorXBase::terminate(RuntimeState* state) {
286
6.55k
    if (_child && !is_source()) {
287
740
        RETURN_IF_ERROR(_child->terminate(state));
288
740
    }
289
6.55k
    auto result = state->get_local_state_result(operator_id());
290
6.55k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
6.55k
    return result.value()->terminate(state);
294
6.55k
}
295
296
4.50M
Status OperatorXBase::close(RuntimeState* state) {
297
4.50M
    if (_child && !is_source()) {
298
759k
        RETURN_IF_ERROR(_child->close(state));
299
759k
    }
300
4.50M
    auto result = state->get_local_state_result(operator_id());
301
4.50M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.50M
    return result.value()->close(state);
305
4.50M
}
306
307
273k
void PipelineXLocalStateBase::clear_origin_block() {
308
273k
    _origin_block.clear_column_data(
309
273k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
273k
}
311
312
708k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
708k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
708k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
708k
    return Status::OK();
317
708k
}
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
273k
                                     Block* output_block) const {
326
273k
    auto* local_state = state->get_local_state(operator_id());
327
273k
    SCOPED_TIMER(local_state->exec_time_counter());
328
273k
    SCOPED_TIMER(local_state->_projection_timer);
329
273k
    const size_t rows = origin_block->rows();
330
273k
    if (rows == 0) {
331
151k
        return Status::OK();
332
151k
    }
333
122k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
122k
    {
336
122k
        Block input_block = *origin_block;
337
338
122k
        ColumnsWithTypeAndName new_columns;
339
122k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.68k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.68k
            new_columns.resize(projections.size());
345
64.3k
            for (int i = 0; i < projections.size(); i++) {
346
60.6k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
60.6k
                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
60.6k
            }
355
3.67k
            Block tmp_block {new_columns};
356
3.67k
            input_block.swap(tmp_block);
357
3.67k
        }
358
359
122k
        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
122k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
122k
                output_block, _projection->output_row_descriptor);
368
122k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
122k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
122k
        Columns shared_columns(mutable_columns.size());
371
372
725k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
603k
            ColumnPtr column_ptr;
374
603k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
603k
            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
603k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
603k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
603k
            if (column_ptr->is_exclusive()) {
386
223k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
379k
            } else {
388
379k
                shared_columns[i] = std::move(column_ptr);
389
379k
            }
390
603k
        }
391
392
122k
        scoped_mutable_block.restore();
393
725k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
603k
            if (shared_columns[i]) {
395
379k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
379k
            }
397
603k
        }
398
122k
    }
399
400
0
    origin_block->clear_column_data(
401
122k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
122k
    DCHECK_EQ(output_block->rows(), rows);
403
404
122k
    return Status::OK();
405
122k
}
406
407
4.19M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.19M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.19M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.19M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.19M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.19M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.19M
            if (_debug_point_count++ % 2 == 0) {
414
4.19M
                return Status::OK();
415
4.19M
            }
416
4.19M
        }
417
4.19M
    });
418
419
4.19M
    Status status;
420
4.19M
    auto* local_state = state->get_local_state(operator_id());
421
4.19M
    Defer defer([&]() {
422
4.19M
        if (status.ok()) {
423
4.19M
            local_state->update_output_block_counters(*block);
424
4.19M
        }
425
4.19M
    });
426
4.19M
    if (has_projection()) {
427
273k
        local_state->clear_origin_block();
428
273k
        status = get_block(state, &local_state->_origin_block, eos);
429
273k
        if (UNLIKELY(!status.ok())) {
430
24
            return status;
431
24
        }
432
273k
        status = do_projections(state, &local_state->_origin_block, block);
433
273k
        return status;
434
273k
    }
435
3.92M
    status = get_block(state, block, eos);
436
3.92M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.92M
    return status;
438
3.92M
}
439
440
2.54M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.54M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
4.29k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
4.29k
        *eos = true;
444
4.29k
    }
445
446
2.54M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.54M
        auto op_name = to_lower(_parent->_op_name);
448
2.54M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.54M
        arg_op_name = to_lower(arg_op_name);
450
451
2.54M
        if (op_name == arg_op_name) {
452
2.54M
            *eos = true;
453
2.54M
        }
454
2.54M
    });
455
456
2.54M
    if (auto rows = block->rows()) {
457
700k
        _num_rows_returned += rows;
458
700k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
700k
    }
460
2.54M
}
461
462
29.8k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
29.8k
    auto result = state->get_sink_local_state_result();
464
29.8k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
29.8k
    return result.value()->terminate(state);
468
29.8k
}
469
470
19.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
19.2k
    fmt::memory_buffer debug_string_buffer;
472
473
19.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
19.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
19.2k
    return fmt::to_string(debug_string_buffer);
476
19.2k
}
477
478
19.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
19.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
19.2k
}
481
482
324k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
324k
    std::string op_name = "UNKNOWN_SINK";
484
324k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
325k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
325k
        op_name = it->second;
488
325k
    }
489
324k
    _name = op_name + "_OPERATOR";
490
324k
    return Status::OK();
491
324k
}
492
493
283k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
283k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
283k
    _nereids_id = tnode.nereids_id;
496
283k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
283k
    _name = substr + "_SINK_OPERATOR";
498
283k
    return Status::OK();
499
283k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.58M
                                                            LocalSinkStateInfo& info) {
504
1.58M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.58M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.58M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.58M
    return Status::OK();
508
1.58M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
117k
                                                            LocalSinkStateInfo& info) {
504
117k
    auto local_state = LocalStateType::create_unique(this, state);
505
117k
    RETURN_IF_ERROR(local_state->init(state, info));
506
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
117k
    return Status::OK();
508
117k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
352k
                                                            LocalSinkStateInfo& info) {
504
352k
    auto local_state = LocalStateType::create_unique(this, state);
505
352k
    RETURN_IF_ERROR(local_state->init(state, info));
506
352k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
352k
    return Status::OK();
508
352k
}
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
379
                                                            LocalSinkStateInfo& info) {
504
379
    auto local_state = LocalStateType::create_unique(this, state);
505
379
    RETURN_IF_ERROR(local_state->init(state, info));
506
379
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
379
    return Status::OK();
508
379
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46.1k
                                                            LocalSinkStateInfo& info) {
504
46.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
46.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
46.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46.1k
    return Status::OK();
508
46.1k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
34
                                                            LocalSinkStateInfo& info) {
504
34
    auto local_state = LocalStateType::create_unique(this, state);
505
34
    RETURN_IF_ERROR(local_state->init(state, info));
506
34
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
34
    return Status::OK();
508
34
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_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
8.73k
                                                            LocalSinkStateInfo& info) {
504
8.73k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.73k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.73k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.73k
    return Status::OK();
508
8.73k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
160k
                                                            LocalSinkStateInfo& info) {
504
160k
    auto local_state = LocalStateType::create_unique(this, state);
505
160k
    RETURN_IF_ERROR(local_state->init(state, info));
506
160k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
160k
    return Status::OK();
508
160k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
30
                                                            LocalSinkStateInfo& info) {
504
30
    auto local_state = LocalStateType::create_unique(this, state);
505
30
    RETURN_IF_ERROR(local_state->init(state, info));
506
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
30
    return Status::OK();
508
30
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
272k
                                                            LocalSinkStateInfo& info) {
504
272k
    auto local_state = LocalStateType::create_unique(this, state);
505
272k
    RETURN_IF_ERROR(local_state->init(state, info));
506
272k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
272k
    return Status::OK();
508
272k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
88.8k
                                                            LocalSinkStateInfo& info) {
504
88.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
88.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
88.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
88.8k
    return Status::OK();
508
88.8k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
66.4k
                                                            LocalSinkStateInfo& info) {
504
66.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
66.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
66.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
66.4k
    return Status::OK();
508
66.4k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
438k
                                                            LocalSinkStateInfo& info) {
504
438k
    auto local_state = LocalStateType::create_unique(this, state);
505
438k
    RETURN_IF_ERROR(local_state->init(state, info));
506
438k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
438k
    return Status::OK();
508
438k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.90k
                                                            LocalSinkStateInfo& info) {
504
7.90k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.90k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.90k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.90k
    return Status::OK();
508
7.90k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.62k
                                                            LocalSinkStateInfo& info) {
504
9.62k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.62k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.62k
    return Status::OK();
508
9.62k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.51k
                                                            LocalSinkStateInfo& info) {
504
2.51k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.51k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.51k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.51k
    return Status::OK();
508
2.51k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
390
                                                            LocalSinkStateInfo& info) {
504
390
    auto local_state = LocalStateType::create_unique(this, state);
505
390
    RETURN_IF_ERROR(local_state->init(state, info));
506
390
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
390
    return Status::OK();
508
390
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.83k
                                                            LocalSinkStateInfo& info) {
504
4.83k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.83k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.83k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.83k
    return Status::OK();
508
4.83k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.59k
                                                            LocalSinkStateInfo& info) {
504
2.59k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.59k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.59k
    return Status::OK();
508
2.59k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.65k
                                                            LocalSinkStateInfo& info) {
504
2.65k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.65k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.65k
    return Status::OK();
508
2.65k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.52k
                                                            LocalSinkStateInfo& info) {
504
2.52k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.52k
    return Status::OK();
508
2.52k
}
_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
564
                                                            LocalSinkStateInfo& info) {
504
564
    auto local_state = LocalStateType::create_unique(this, state);
505
564
    RETURN_IF_ERROR(local_state->init(state, info));
506
564
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
564
    return Status::OK();
508
564
}
_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
102
                                                            LocalSinkStateInfo& info) {
504
102
    auto local_state = LocalStateType::create_unique(this, state);
505
102
    RETURN_IF_ERROR(local_state->init(state, info));
506
102
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
102
    return Status::OK();
508
102
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
509
510
template <typename LocalStateType>
511
1.21M
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.21M
    } else {
519
1.21M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.21M
        ss->id = operator_id();
521
1.21M
        for (auto& dest : dests_id()) {
522
1.20M
            ss->related_op_ids.insert(dest);
523
1.20M
        }
524
1.21M
        return ss;
525
1.21M
    }
526
1.21M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_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
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
105k
        return ss;
525
105k
    }
526
105k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
352k
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
352k
    } else {
519
352k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
352k
        ss->id = operator_id();
521
352k
        for (auto& dest : dests_id()) {
522
349k
            ss->related_op_ids.insert(dest);
523
349k
        }
524
352k
        return ss;
525
352k
    }
526
352k
}
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
379
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
379
    } else {
519
379
        auto ss = LocalStateType::SharedStateType::create_shared();
520
379
        ss->id = operator_id();
521
379
        for (auto& dest : dests_id()) {
522
379
            ss->related_op_ids.insert(dest);
523
379
        }
524
379
        return ss;
525
379
    }
526
379
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
46.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
46.2k
    } else {
519
46.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
46.2k
        ss->id = operator_id();
521
46.2k
        for (auto& dest : dests_id()) {
522
45.7k
            ss->related_op_ids.insert(dest);
523
45.7k
        }
524
46.2k
        return ss;
525
46.2k
    }
526
46.2k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
34
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
34
    } else {
519
34
        auto ss = LocalStateType::SharedStateType::create_shared();
520
34
        ss->id = operator_id();
521
34
        for (auto& dest : dests_id()) {
522
34
            ss->related_op_ids.insert(dest);
523
34
        }
524
34
        return ss;
525
34
    }
526
34
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_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
8.77k
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.77k
    } else {
519
8.77k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.77k
        ss->id = operator_id();
521
8.78k
        for (auto& dest : dests_id()) {
522
8.78k
            ss->related_op_ids.insert(dest);
523
8.78k
        }
524
8.77k
        return ss;
525
8.77k
    }
526
8.77k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
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
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
160k
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
160k
    } else {
519
160k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
160k
        ss->id = operator_id();
521
160k
        for (auto& dest : dests_id()) {
522
160k
            ss->related_op_ids.insert(dest);
523
160k
        }
524
160k
        return ss;
525
160k
    }
526
160k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
32
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
32
    } else {
519
32
        auto ss = LocalStateType::SharedStateType::create_shared();
520
32
        ss->id = operator_id();
521
32
        for (auto& dest : dests_id()) {
522
32
            ss->related_op_ids.insert(dest);
523
32
        }
524
32
        return ss;
525
32
    }
526
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
89.0k
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
89.0k
    } else {
519
89.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
89.0k
        ss->id = operator_id();
521
89.0k
        for (auto& dest : dests_id()) {
522
88.9k
            ss->related_op_ids.insert(dest);
523
88.9k
        }
524
89.0k
        return ss;
525
89.0k
    }
526
89.0k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
163
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
163
    } else {
519
163
        auto ss = LocalStateType::SharedStateType::create_shared();
520
163
        ss->id = operator_id();
521
163
        for (auto& dest : dests_id()) {
522
163
            ss->related_op_ids.insert(dest);
523
163
        }
524
163
        return ss;
525
163
    }
526
163
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
439k
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
439k
    } else {
519
439k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
439k
        ss->id = operator_id();
521
439k
        for (auto& dest : dests_id()) {
522
433k
            ss->related_op_ids.insert(dest);
523
433k
        }
524
439k
        return ss;
525
439k
    }
526
439k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
7.93k
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
7.93k
    } else {
519
7.93k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7.93k
        ss->id = operator_id();
521
7.93k
        for (auto& dest : dests_id()) {
522
7.92k
            ss->related_op_ids.insert(dest);
523
7.92k
        }
524
7.93k
        return ss;
525
7.93k
    }
526
7.93k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
488
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
488
    } else {
519
488
        auto ss = LocalStateType::SharedStateType::create_shared();
520
488
        ss->id = operator_id();
521
489
        for (auto& dest : dests_id()) {
522
489
            ss->related_op_ids.insert(dest);
523
489
        }
524
488
        return ss;
525
488
    }
526
488
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.64k
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.64k
    } else {
519
2.64k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.64k
        ss->id = operator_id();
521
2.64k
        for (auto& dest : dests_id()) {
522
2.64k
            ss->related_op_ids.insert(dest);
523
2.64k
        }
524
2.64k
        return ss;
525
2.64k
    }
526
2.64k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
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.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.55k
        for (auto& dest : dests_id()) {
522
2.55k
            ss->related_op_ids.insert(dest);
523
2.55k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
569
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
569
    } else {
519
569
        auto ss = LocalStateType::SharedStateType::create_shared();
520
569
        ss->id = operator_id();
521
569
        for (auto& dest : dests_id()) {
522
564
            ss->related_op_ids.insert(dest);
523
564
        }
524
569
        return ss;
525
569
    }
526
569
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102
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
102
    } else {
519
102
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102
        ss->id = operator_id();
521
102
        for (auto& dest : dests_id()) {
522
100
            ss->related_op_ids.insert(dest);
523
100
        }
524
102
        return ss;
525
102
    }
526
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.89M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.89M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.89M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.89M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.89M
    return Status::OK();
534
1.89M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
69.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
69.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
69.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
69.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
69.4k
    return Status::OK();
534
69.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
234k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
234k
    auto local_state = LocalStateType::create_unique(state, this);
531
234k
    RETURN_IF_ERROR(local_state->init(state, info));
532
234k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
234k
    return Status::OK();
534
234k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
137
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
137
    auto local_state = LocalStateType::create_unique(state, this);
531
137
    RETURN_IF_ERROR(local_state->init(state, info));
532
137
    state->emplace_local_state(operator_id(), std::move(local_state));
533
137
    return Status::OK();
534
137
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.07k
    return Status::OK();
534
3.07k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.73k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.73k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.73k
    return Status::OK();
534
8.73k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.65k
    return Status::OK();
534
8.65k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
23
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
23
    auto local_state = LocalStateType::create_unique(state, this);
531
23
    RETURN_IF_ERROR(local_state->init(state, info));
532
23
    state->emplace_local_state(operator_id(), std::move(local_state));
533
23
    return Status::OK();
534
23
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
151k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
151k
    auto local_state = LocalStateType::create_unique(state, this);
531
151k
    RETURN_IF_ERROR(local_state->init(state, info));
532
151k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
151k
    return Status::OK();
534
151k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
88.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
88.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
88.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
88.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
88.8k
    return Status::OK();
534
88.8k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
66.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
66.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
66.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
66.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
66.6k
    return Status::OK();
534
66.6k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
154
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
154
    auto local_state = LocalStateType::create_unique(state, this);
531
154
    RETURN_IF_ERROR(local_state->init(state, info));
532
154
    state->emplace_local_state(operator_id(), std::move(local_state));
533
154
    return Status::OK();
534
154
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.88k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.88k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.88k
    return Status::OK();
534
3.88k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
268k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
268k
    auto local_state = LocalStateType::create_unique(state, this);
531
268k
    RETURN_IF_ERROR(local_state->init(state, info));
532
268k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
268k
    return Status::OK();
534
268k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.50k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.50k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.50k
    return Status::OK();
534
1.50k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.88k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.88k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.88k
    return Status::OK();
534
7.88k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
54.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.0k
    return Status::OK();
534
54.0k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.99k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.99k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.99k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.99k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.99k
    return Status::OK();
534
5.99k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
381
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
381
    auto local_state = LocalStateType::create_unique(state, this);
531
381
    RETURN_IF_ERROR(local_state->init(state, info));
532
381
    state->emplace_local_state(operator_id(), std::move(local_state));
533
381
    return Status::OK();
534
381
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.67k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.67k
    return Status::OK();
534
2.67k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.56k
    return Status::OK();
534
2.56k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
291
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
291
    auto local_state = LocalStateType::create_unique(state, this);
531
291
    RETURN_IF_ERROR(local_state->init(state, info));
532
291
    state->emplace_local_state(operator_id(), std::move(local_state));
533
291
    return Status::OK();
534
291
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.12k
    return Status::OK();
534
5.12k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
609k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
609k
    auto local_state = LocalStateType::create_unique(state, this);
531
609k
    RETURN_IF_ERROR(local_state->init(state, info));
532
609k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
609k
    return Status::OK();
534
609k
}
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
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
164
    auto local_state = LocalStateType::create_unique(state, this);
531
164
    RETURN_IF_ERROR(local_state->init(state, info));
532
164
    state->emplace_local_state(operator_id(), std::move(local_state));
533
164
    return Status::OK();
534
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18k
    return Status::OK();
534
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_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_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
986
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
986
    auto local_state = LocalStateType::create_unique(state, this);
531
986
    RETURN_IF_ERROR(local_state->init(state, info));
532
986
    state->emplace_local_state(operator_id(), std::move(local_state));
533
986
    return Status::OK();
534
986
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.46k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.46k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.46k
    return Status::OK();
534
6.46k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
284k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
284k
    auto local_state = LocalStateType::create_unique(state, this);
531
284k
    RETURN_IF_ERROR(local_state->init(state, info));
532
284k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
284k
    return Status::OK();
534
284k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.57M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.88M
        : _num_rows_returned(0),
542
1.88M
          _rows_returned_counter(nullptr),
543
1.88M
          _parent(parent),
544
1.88M
          _state(state),
545
1.88M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.89M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.89M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.89M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.89M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.89M
    _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.89M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.89M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.89M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.89M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.89M
    if constexpr (!is_fake_shared) {
560
1.07M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
686k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
686k
                                    .first.get()
563
686k
                                    ->template cast<SharedStateArg>();
564
565
686k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
686k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
686k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
686k
        } else if (info.shared_state) {
569
333k
            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
333k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
333k
            _dependency = _shared_state->create_source_dependency(
576
333k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
333k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
333k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
333k
        } else {
580
58.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.26k
                DCHECK(false);
582
3.26k
            }
583
58.7k
        }
584
1.07M
    }
585
586
1.89M
    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.89M
    _rows_returned_counter =
591
1.89M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.89M
    _blocks_returned_counter =
593
1.89M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.89M
    _output_block_bytes_counter =
595
1.89M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.89M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.89M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.89M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.89M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.89M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.89M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.89M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.89M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.89M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.89M
    _memory_used_counter =
606
1.89M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.89M
    _common_profile->add_info_string("IsColocate",
608
1.89M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.89M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.89M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.89M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.89M
    return Status::OK();
613
1.89M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
69.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
69.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
69.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
69.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
69.3k
    _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.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
69.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
69.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
69.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
69.3k
    if constexpr (!is_fake_shared) {
560
69.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
12.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
12.4k
                                    .first.get()
563
12.4k
                                    ->template cast<SharedStateArg>();
564
565
12.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
12.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
12.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.9k
        } 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
56.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
56.3k
            _dependency = _shared_state->create_source_dependency(
576
56.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
56.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
56.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
56.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
593
        }
584
69.3k
    }
585
586
69.3k
    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.3k
    _rows_returned_counter =
591
69.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
69.3k
    _blocks_returned_counter =
593
69.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
69.3k
    _output_block_bytes_counter =
595
69.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
69.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
69.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
69.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
69.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
69.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
69.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
69.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
69.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
69.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
69.3k
    _memory_used_counter =
606
69.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
69.3k
    _common_profile->add_info_string("IsColocate",
608
69.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
69.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
69.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
69.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
69.3k
    return Status::OK();
613
69.3k
}
_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
160k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
160k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
160k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
160k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
160k
    _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
160k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
160k
    _operator_profile->add_child(_common_profile.get(), true);
557
160k
    _operator_profile->add_child(_custom_profile.get(), true);
558
160k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
160k
    if constexpr (!is_fake_shared) {
560
160k
        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
160k
        } 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
156k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
156k
            _dependency = _shared_state->create_source_dependency(
576
156k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
156k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
156k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
156k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4.08k
        }
584
160k
    }
585
586
160k
    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
160k
    _rows_returned_counter =
591
160k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
160k
    _blocks_returned_counter =
593
160k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
160k
    _output_block_bytes_counter =
595
160k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
160k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
160k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
160k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
160k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
160k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
160k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
160k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
160k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
160k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
160k
    _memory_used_counter =
606
160k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
160k
    _common_profile->add_info_string("IsColocate",
608
160k
                                     std::to_string(_parent->is_colocated_operator()));
609
160k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
160k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
160k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
160k
    return Status::OK();
613
160k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
23
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
23
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
23
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
23
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
23
    _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
23
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
23
    _operator_profile->add_child(_common_profile.get(), true);
557
23
    _operator_profile->add_child(_custom_profile.get(), true);
558
23
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
23
    if constexpr (!is_fake_shared) {
560
23
        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
23
        } 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
23
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
23
            _dependency = _shared_state->create_source_dependency(
576
23
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
23
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
23
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
23
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
23
    }
585
586
23
    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
23
    _rows_returned_counter =
591
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
23
    _blocks_returned_counter =
593
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
23
    _output_block_bytes_counter =
595
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
23
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
23
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
23
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
23
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
23
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
23
    _memory_used_counter =
606
23
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
23
    _common_profile->add_info_string("IsColocate",
608
23
                                     std::to_string(_parent->is_colocated_operator()));
609
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
23
    return Status::OK();
613
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
7.91k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
7.91k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
7.91k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
7.91k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
7.91k
    _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
7.91k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
7.91k
    _operator_profile->add_child(_common_profile.get(), true);
557
7.91k
    _operator_profile->add_child(_custom_profile.get(), true);
558
7.91k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
7.91k
    if constexpr (!is_fake_shared) {
560
7.91k
        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
7.91k
        } 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
7.84k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
7.84k
            _dependency = _shared_state->create_source_dependency(
576
7.84k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
7.84k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
7.84k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
7.84k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
77
        }
584
7.91k
    }
585
586
7.91k
    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
7.91k
    _rows_returned_counter =
591
7.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
7.91k
    _blocks_returned_counter =
593
7.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
7.91k
    _output_block_bytes_counter =
595
7.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.91k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
7.91k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
7.91k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
7.91k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
7.91k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
7.91k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
7.91k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
7.91k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
7.91k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
7.91k
    _memory_used_counter =
606
7.91k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
7.91k
    _common_profile->add_info_string("IsColocate",
608
7.91k
                                     std::to_string(_parent->is_colocated_operator()));
609
7.91k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
7.91k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
7.91k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
7.91k
    return Status::OK();
613
7.91k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.76k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.76k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.76k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.76k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.76k
    _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.76k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.76k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.76k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.76k
    if constexpr (!is_fake_shared) {
560
8.76k
        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.76k
        } 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.67k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.67k
            _dependency = _shared_state->create_source_dependency(
576
8.67k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.67k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.67k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.67k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
89
        }
584
8.76k
    }
585
586
8.76k
    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.76k
    _rows_returned_counter =
591
8.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.76k
    _blocks_returned_counter =
593
8.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.76k
    _output_block_bytes_counter =
595
8.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.76k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.76k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.76k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.76k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.76k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.76k
    _memory_used_counter =
606
8.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.76k
    _common_profile->add_info_string("IsColocate",
608
8.76k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.76k
    return Status::OK();
613
8.76k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
88.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
88.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
88.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
88.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
88.9k
    _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
88.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
88.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
88.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
88.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
88.9k
    if constexpr (!is_fake_shared) {
560
88.9k
        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
88.9k
        } 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
88.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
88.0k
            _dependency = _shared_state->create_source_dependency(
576
88.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
88.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
88.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
88.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
927
        }
584
88.9k
    }
585
586
88.9k
    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
88.9k
    _rows_returned_counter =
591
88.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
88.9k
    _blocks_returned_counter =
593
88.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
88.9k
    _output_block_bytes_counter =
595
88.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
88.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
88.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
88.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
88.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
88.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
88.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
88.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
88.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
88.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
88.9k
    _memory_used_counter =
606
88.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
88.9k
    _common_profile->add_info_string("IsColocate",
608
88.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
88.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
88.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
88.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
88.9k
    return Status::OK();
613
88.9k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
66.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
66.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
66.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
66.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
66.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
66.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
66.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
66.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
66.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
66.5k
    if constexpr (!is_fake_shared) {
560
66.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
66.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
66.5k
                                    .first.get()
563
66.5k
                                    ->template cast<SharedStateArg>();
564
565
66.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
66.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
66.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } 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
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
66.5k
    }
585
586
66.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
66.5k
    _rows_returned_counter =
591
66.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
66.5k
    _blocks_returned_counter =
593
66.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
66.5k
    _output_block_bytes_counter =
595
66.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
66.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
66.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
66.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
66.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
66.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
66.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
66.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
66.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
66.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
66.5k
    _memory_used_counter =
606
66.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
66.5k
    _common_profile->add_info_string("IsColocate",
608
66.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
66.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
66.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
66.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
66.5k
    return Status::OK();
613
66.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
154
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
154
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
154
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
154
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
154
    _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
154
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
154
    _operator_profile->add_child(_common_profile.get(), true);
557
154
    _operator_profile->add_child(_custom_profile.get(), true);
558
154
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
154
    if constexpr (!is_fake_shared) {
560
154
        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
154
        } 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
154
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
154
            _dependency = _shared_state->create_source_dependency(
576
154
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
154
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
154
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
154
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
154
    }
585
586
154
    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
154
    _rows_returned_counter =
591
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
154
    _blocks_returned_counter =
593
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
154
    _output_block_bytes_counter =
595
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
154
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
154
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
154
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
154
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
154
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
154
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
154
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
154
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
154
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
154
    _memory_used_counter =
606
154
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
154
    _common_profile->add_info_string("IsColocate",
608
154
                                     std::to_string(_parent->is_colocated_operator()));
609
154
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
154
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
154
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
154
    return Status::OK();
613
154
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
811k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
811k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
811k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
811k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
811k
    _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
811k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
811k
    _operator_profile->add_child(_common_profile.get(), true);
557
811k
    _operator_profile->add_child(_custom_profile.get(), true);
558
811k
    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
811k
    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
811k
    _rows_returned_counter =
591
811k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
811k
    _blocks_returned_counter =
593
811k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
811k
    _output_block_bytes_counter =
595
811k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
811k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
811k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
811k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
811k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
811k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
811k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
811k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
811k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
811k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
811k
    _memory_used_counter =
606
811k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
811k
    _common_profile->add_info_string("IsColocate",
608
811k
                                     std::to_string(_parent->is_colocated_operator()));
609
811k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
811k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
811k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
811k
    return Status::OK();
613
811k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
53.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
53.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
53.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
53.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
53.9k
    _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
53.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
53.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
53.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
53.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
53.9k
    if constexpr (!is_fake_shared) {
560
53.9k
        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
53.9k
        } 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.34k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.34k
            _dependency = _shared_state->create_source_dependency(
576
4.34k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.34k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.34k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
49.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49.5k
        }
584
53.9k
    }
585
586
53.9k
    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
53.9k
    _rows_returned_counter =
591
53.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
53.9k
    _blocks_returned_counter =
593
53.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
53.9k
    _output_block_bytes_counter =
595
53.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
53.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
53.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
53.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
53.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
53.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
53.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
53.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
53.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
53.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
53.9k
    _memory_used_counter =
606
53.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
53.9k
    _common_profile->add_info_string("IsColocate",
608
53.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
53.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
53.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
53.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
53.9k
    return Status::OK();
613
53.9k
}
_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
6.00k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.00k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.00k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.00k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.00k
    _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
6.00k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.00k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.00k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.00k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.00k
    if constexpr (!is_fake_shared) {
560
6.00k
        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
6.00k
        } 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.95k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.95k
            _dependency = _shared_state->create_source_dependency(
576
5.95k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.95k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.95k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.95k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51
        }
584
6.00k
    }
585
586
6.00k
    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
6.00k
    _rows_returned_counter =
591
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.00k
    _blocks_returned_counter =
593
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.00k
    _output_block_bytes_counter =
595
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.00k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.00k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.00k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.00k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.00k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.00k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.00k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.00k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.00k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.00k
    _memory_used_counter =
606
6.00k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.00k
    _common_profile->add_info_string("IsColocate",
608
6.00k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.00k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.00k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.00k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.00k
    return Status::OK();
613
6.00k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
491
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
491
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
491
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
491
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
491
    _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
491
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
491
    _operator_profile->add_child(_common_profile.get(), true);
557
491
    _operator_profile->add_child(_custom_profile.get(), true);
558
491
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
491
    if constexpr (!is_fake_shared) {
560
491
        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
491
        } 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
474
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
474
            _dependency = _shared_state->create_source_dependency(
576
474
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
474
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
474
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
474
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
17
        }
584
491
    }
585
586
491
    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
491
    _rows_returned_counter =
591
491
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
491
    _blocks_returned_counter =
593
491
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
491
    _output_block_bytes_counter =
595
491
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
491
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
491
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
491
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
491
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
491
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
491
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
491
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
491
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
491
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
491
    _memory_used_counter =
606
491
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
491
    _common_profile->add_info_string("IsColocate",
608
491
                                     std::to_string(_parent->is_colocated_operator()));
609
491
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
491
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
491
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
491
    return Status::OK();
613
491
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.25k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.25k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.25k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.25k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.25k
    _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.25k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.25k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.25k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.25k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.25k
    if constexpr (!is_fake_shared) {
560
5.25k
        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.25k
        } 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.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.19k
            _dependency = _shared_state->create_source_dependency(
576
5.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
56
        }
584
5.25k
    }
585
586
5.25k
    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.25k
    _rows_returned_counter =
591
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.25k
    _blocks_returned_counter =
593
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.25k
    _output_block_bytes_counter =
595
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.25k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.25k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.25k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.25k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.25k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.25k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.25k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.25k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.25k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.25k
    _memory_used_counter =
606
5.25k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.25k
    _common_profile->add_info_string("IsColocate",
608
5.25k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.25k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.25k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.25k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.25k
    return Status::OK();
613
5.25k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
610k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
610k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
610k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
610k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
610k
    _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
610k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
610k
    _operator_profile->add_child(_common_profile.get(), true);
557
610k
    _operator_profile->add_child(_custom_profile.get(), true);
558
610k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
610k
    if constexpr (!is_fake_shared) {
560
610k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
607k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
607k
                                    .first.get()
563
607k
                                    ->template cast<SharedStateArg>();
564
565
607k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
607k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
607k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
607k
        } 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
3.26k
        } else {
580
3.26k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.26k
                DCHECK(false);
582
3.26k
            }
583
3.26k
        }
584
610k
    }
585
586
610k
    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
610k
    _rows_returned_counter =
591
610k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
610k
    _blocks_returned_counter =
593
610k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
610k
    _output_block_bytes_counter =
595
610k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
610k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
610k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
610k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
610k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
610k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
610k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
610k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
610k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
610k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
610k
    _memory_used_counter =
606
610k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
610k
    _common_profile->add_info_string("IsColocate",
608
610k
                                     std::to_string(_parent->is_colocated_operator()));
609
610k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
610k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
610k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
610k
    return Status::OK();
613
610k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
164
    _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
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
164
    _operator_profile->add_child(_common_profile.get(), true);
557
164
    _operator_profile->add_child(_custom_profile.get(), true);
558
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
164
    if constexpr (!is_fake_shared) {
560
164
        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
164
        } 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
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
164
            _dependency = _shared_state->create_source_dependency(
576
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
164
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
164
    }
585
586
164
    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
164
    _rows_returned_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
164
    _blocks_returned_counter =
593
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
164
    _output_block_bytes_counter =
595
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
164
    _memory_used_counter =
606
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
164
    _common_profile->add_info_string("IsColocate",
608
164
                                     std::to_string(_parent->is_colocated_operator()));
609
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
164
    return Status::OK();
613
164
}
614
615
template <typename SharedStateArg>
616
1.90M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.90M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.19M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
290k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
290k
    }
621
1.90M
    if (_parent->has_projection()) {
622
366k
        const auto& projection = *_parent->_projection;
623
366k
        _projections.resize(projection.projections.size());
624
2.26M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.90M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.90M
        }
627
366k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
380k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14.1k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
184k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
170k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
170k
                        state, _intermediate_projections[i][j]));
633
170k
            }
634
14.1k
        }
635
366k
    }
636
1.90M
    return Status::OK();
637
1.90M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
69.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
69.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
71.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.48k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.48k
    }
621
69.9k
    if (_parent->has_projection()) {
622
69.9k
        const auto& projection = *_parent->_projection;
623
69.9k
        _projections.resize(projection.projections.size());
624
376k
        for (size_t i = 0; i < _projections.size(); i++) {
625
306k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
306k
        }
627
69.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
75.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.71k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
132k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
126k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
126k
                        state, _intermediate_projections[i][j]));
633
126k
            }
634
5.71k
        }
635
69.9k
    }
636
69.9k
    return Status::OK();
637
69.9k
}
_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
161k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
161k
    _conjuncts.resize(_parent->_conjuncts.size());
618
161k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
161k
    if (_parent->has_projection()) {
622
78
        const auto& projection = *_parent->_projection;
623
78
        _projections.resize(projection.projections.size());
624
396
        for (size_t i = 0; i < _projections.size(); i++) {
625
318
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
318
        }
627
78
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
78
        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
78
    }
636
161k
    return Status::OK();
637
161k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
23
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
23
    _conjuncts.resize(_parent->_conjuncts.size());
618
23
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
23
    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
23
    return Status::OK();
637
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
7.93k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
7.93k
    _conjuncts.resize(_parent->_conjuncts.size());
618
8.07k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
139
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
139
    }
621
7.94k
    if (_parent->has_projection()) {
622
7.94k
        const auto& projection = *_parent->_projection;
623
7.94k
        _projections.resize(projection.projections.size());
624
34.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
26.3k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
26.3k
        }
627
7.94k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.98k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
42
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
298
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
256
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
256
                        state, _intermediate_projections[i][j]));
633
256
            }
634
42
        }
635
7.94k
    }
636
7.93k
    return Status::OK();
637
7.93k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.80k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.80k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.67k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
870
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
870
    }
621
8.80k
    if (_parent->has_projection()) {
622
5.07k
        const auto& projection = *_parent->_projection;
623
5.07k
        _projections.resize(projection.projections.size());
624
20.1k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.0k
        }
627
5.07k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.16k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
89
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
667
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
578
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
578
                        state, _intermediate_projections[i][j]));
633
578
            }
634
89
        }
635
5.07k
    }
636
8.80k
    return Status::OK();
637
8.80k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
89.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
89.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
90.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.40k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.40k
    }
621
89.2k
    if (_parent->has_projection()) {
622
31.2k
        const auto& projection = *_parent->_projection;
623
31.2k
        _projections.resize(projection.projections.size());
624
274k
        for (size_t i = 0; i < _projections.size(); i++) {
625
243k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
243k
        }
627
31.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
31.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
203
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.27k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.07k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.07k
                        state, _intermediate_projections[i][j]));
633
1.07k
            }
634
203
        }
635
31.2k
    }
636
89.2k
    return Status::OK();
637
89.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
66.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
66.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
66.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
10
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
10
    }
621
66.6k
    if (_parent->has_projection()) {
622
107
        const auto& projection = *_parent->_projection;
623
107
        _projections.resize(projection.projections.size());
624
457
        for (size_t i = 0; i < _projections.size(); i++) {
625
350
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
350
        }
627
107
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
107
        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
107
    }
636
66.6k
    return Status::OK();
637
66.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
158
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
158
    _conjuncts.resize(_parent->_conjuncts.size());
618
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
158
    if (_parent->has_projection()) {
622
140
        const auto& projection = *_parent->_projection;
623
140
        _projections.resize(projection.projections.size());
624
420
        for (size_t i = 0; i < _projections.size(); i++) {
625
280
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
280
        }
627
140
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
140
        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
140
    }
636
158
    return Status::OK();
637
158
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
819k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
819k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.10M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
285k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
285k
    }
621
819k
    if (_parent->has_projection()) {
622
240k
        const auto& projection = *_parent->_projection;
623
240k
        _projections.resize(projection.projections.size());
624
1.45M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.21M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.21M
        }
627
240k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
248k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7.94k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
46.7k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
38.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
38.7k
                        state, _intermediate_projections[i][j]));
633
38.7k
            }
634
7.94k
        }
635
240k
    }
636
819k
    return Status::OK();
637
819k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
54.2k
    if (_parent->has_projection()) {
622
11.4k
        const auto& projection = *_parent->_projection;
623
11.4k
        _projections.resize(projection.projections.size());
624
110k
        for (size_t i = 0; i < _projections.size(); i++) {
625
98.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
98.5k
        }
627
11.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
169
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.32k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.15k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.15k
                        state, _intermediate_projections[i][j]));
633
3.15k
            }
634
169
        }
635
11.4k
    }
636
54.2k
    return Status::OK();
637
54.2k
}
_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.99k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.99k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.71k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
711
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
711
    }
621
5.99k
    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.99k
    return Status::OK();
637
5.99k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
494
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
494
    _conjuncts.resize(_parent->_conjuncts.size());
618
494
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
494
    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
494
    return Status::OK();
637
494
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.26k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.26k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.26k
    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.26k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        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
60
    }
636
5.26k
    return Status::OK();
637
5.26k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
615k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
615k
    _conjuncts.resize(_parent->_conjuncts.size());
618
615k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
615k
    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
615k
    return Status::OK();
637
615k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
164
    if (_parent->has_projection()) {
622
161
        const auto& projection = *_parent->_projection;
623
161
        _projections.resize(projection.projections.size());
624
480
        for (size_t i = 0; i < _projections.size(); i++) {
625
319
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
319
        }
627
161
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
164
        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
161
    }
636
164
    return Status::OK();
637
164
}
638
639
template <typename SharedStateArg>
640
6.56k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.56k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.56k
    _terminated = true;
645
6.56k
    return Status::OK();
646
6.56k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
362
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
362
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
362
    _terminated = true;
645
362
    return Status::OK();
646
362
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
20
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
20
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
20
    _terminated = true;
645
20
    return Status::OK();
646
20
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
37
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
37
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
37
    _terminated = true;
645
37
    return Status::OK();
646
37
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
180
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
180
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
180
    _terminated = true;
645
180
    return Status::OK();
646
180
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4.54k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4.54k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4.54k
    _terminated = true;
645
4.54k
    return Status::OK();
646
4.54k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
51
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
51
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
51
    _terminated = true;
645
51
    return Status::OK();
646
51
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.32k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.32k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.32k
    _terminated = true;
645
1.32k
    return Status::OK();
646
1.32k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
37
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
37
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
37
    _terminated = true;
645
37
    return Status::OK();
646
37
}
647
648
template <typename SharedStateArg>
649
2.09M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.09M
    if (_closed) {
651
190k
        return Status::OK();
652
190k
    }
653
1.90M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.08M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.08M
    }
656
1.90M
    _closed = true;
657
1.90M
    return Status::OK();
658
2.09M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
69.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
69.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
69.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
69.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
69.8k
    }
656
69.8k
    _closed = true;
657
69.8k
    return Status::OK();
658
69.8k
}
_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
320k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
320k
    if (_closed) {
651
160k
        return Status::OK();
652
160k
    }
653
160k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160k
    }
656
160k
    _closed = true;
657
160k
    return Status::OK();
658
320k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
23
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
23
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
23
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
23
    }
656
23
    _closed = true;
657
23
    return Status::OK();
658
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7.93k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7.93k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.93k
    }
656
7.93k
    _closed = true;
657
7.93k
    return Status::OK();
658
7.93k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
17.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
17.7k
    if (_closed) {
651
8.99k
        return Status::OK();
652
8.99k
    }
653
8.78k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.78k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.78k
    }
656
8.78k
    _closed = true;
657
8.78k
    return Status::OK();
658
17.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
88.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
88.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
88.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
88.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
88.9k
    }
656
88.9k
    _closed = true;
657
88.9k
    return Status::OK();
658
88.9k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
66.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
66.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
66.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
66.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
66.1k
    }
656
66.1k
    _closed = true;
657
66.1k
    return Status::OK();
658
66.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
153
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
153
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
153
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
153
    }
656
153
    _closed = true;
657
153
    return Status::OK();
658
153
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
835k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
835k
    if (_closed) {
651
15.1k
        return Status::OK();
652
15.1k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
819k
    _closed = true;
657
819k
    return Status::OK();
658
835k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.2k
    }
656
54.2k
    _closed = true;
657
54.2k
    return Status::OK();
658
54.2k
}
_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.96k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.96k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.96k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.96k
    }
656
5.96k
    _closed = true;
657
5.96k
    return Status::OK();
658
5.96k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
783
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
783
    if (_closed) {
651
392
        return Status::OK();
652
392
    }
653
391
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
391
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
391
    }
656
391
    _closed = true;
657
391
    return Status::OK();
658
783
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.9k
    if (_closed) {
651
5.70k
        return Status::OK();
652
5.70k
    }
653
5.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.24k
    }
656
5.24k
    _closed = true;
657
5.24k
    return Status::OK();
658
10.9k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
616k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
616k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
616k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
616k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
616k
    }
656
616k
    _closed = true;
657
616k
    return Status::OK();
658
616k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
324
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
324
    if (_closed) {
651
169
        return Status::OK();
652
169
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
324
}
659
660
template <typename SharedState>
661
1.58M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.58M
    _operator_profile =
664
1.58M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.58M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.58M
    _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.58M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.58M
    _operator_profile->add_child(_common_profile, true);
673
1.58M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.58M
    _operator_profile->set_metadata(_parent->node_id());
676
1.58M
    _wait_for_finish_dependency_timer =
677
1.58M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.58M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.58M
    if constexpr (!is_fake_shared) {
680
1.14M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.14M
            info.shared_state_map.end()) {
682
352k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
273k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
273k
            }
685
352k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
352k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
352k
                                                  ? 0
688
352k
                                                  : info.task_idx]
689
352k
                                  .get();
690
352k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
795k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
795k
            _shared_state = info.shared_state->template cast<SharedState>();
696
795k
            _dependency = _shared_state->create_sink_dependency(
697
795k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
795k
        }
699
1.14M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.14M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.14M
    }
702
703
1.58M
    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.58M
    _rows_input_counter =
708
1.58M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.58M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.58M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.58M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.58M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.58M
    _memory_used_counter =
714
1.58M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.58M
    _common_profile->add_info_string("IsColocate",
716
1.58M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.58M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.58M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.58M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.58M
    return Status::OK();
721
1.58M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
117k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
117k
    _operator_profile =
664
117k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
117k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
117k
    _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
117k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
117k
    _operator_profile->add_child(_common_profile, true);
673
117k
    _operator_profile->add_child(_custom_profile, true);
674
675
117k
    _operator_profile->set_metadata(_parent->node_id());
676
117k
    _wait_for_finish_dependency_timer =
677
117k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
117k
    if constexpr (!is_fake_shared) {
680
117k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
117k
            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
12.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
12.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
12.6k
                                                  ? 0
688
12.6k
                                                  : info.task_idx]
689
12.6k
                                  .get();
690
12.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
117k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
117k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
117k
    }
702
703
117k
    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
117k
    _rows_input_counter =
708
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
117k
    _memory_used_counter =
714
117k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
117k
    _common_profile->add_info_string("IsColocate",
716
117k
                                     std::to_string(_parent->is_colocated_operator()));
717
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
117k
    return Status::OK();
721
117k
}
_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
160k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
160k
    _operator_profile =
664
160k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
160k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
160k
    _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
160k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
160k
    _operator_profile->add_child(_common_profile, true);
673
160k
    _operator_profile->add_child(_custom_profile, true);
674
675
160k
    _operator_profile->set_metadata(_parent->node_id());
676
160k
    _wait_for_finish_dependency_timer =
677
160k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
160k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
160k
    if constexpr (!is_fake_shared) {
680
160k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
160k
            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
160k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
160k
            _shared_state = info.shared_state->template cast<SharedState>();
696
160k
            _dependency = _shared_state->create_sink_dependency(
697
160k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
160k
        }
699
160k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
160k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
160k
    }
702
703
160k
    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
160k
    _rows_input_counter =
708
160k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
160k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
160k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
160k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
160k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
160k
    _memory_used_counter =
714
160k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
160k
    _common_profile->add_info_string("IsColocate",
716
160k
                                     std::to_string(_parent->is_colocated_operator()));
717
160k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
160k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
160k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
160k
    return Status::OK();
721
160k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
30
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
30
    _operator_profile =
664
30
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
30
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
30
    _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
30
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
30
    _operator_profile->add_child(_common_profile, true);
673
30
    _operator_profile->add_child(_custom_profile, true);
674
675
30
    _operator_profile->set_metadata(_parent->node_id());
676
30
    _wait_for_finish_dependency_timer =
677
30
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
30
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
30
    if constexpr (!is_fake_shared) {
680
30
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
30
            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
30
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
30
            _shared_state = info.shared_state->template cast<SharedState>();
696
30
            _dependency = _shared_state->create_sink_dependency(
697
30
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
30
        }
699
30
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
30
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
30
    }
702
703
30
    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
30
    _rows_input_counter =
708
30
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
30
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
30
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
30
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
30
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
30
    _memory_used_counter =
714
30
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
30
    _common_profile->add_info_string("IsColocate",
716
30
                                     std::to_string(_parent->is_colocated_operator()));
717
30
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
30
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
30
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
30
    return Status::OK();
721
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.92k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.92k
    _operator_profile =
664
7.92k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.92k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.92k
    _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
7.92k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.92k
    _operator_profile->add_child(_common_profile, true);
673
7.92k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.92k
    _operator_profile->set_metadata(_parent->node_id());
676
7.92k
    _wait_for_finish_dependency_timer =
677
7.92k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.92k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.92k
    if constexpr (!is_fake_shared) {
680
7.92k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.92k
            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
7.92k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.92k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.92k
            _dependency = _shared_state->create_sink_dependency(
697
7.92k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.92k
        }
699
7.92k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.92k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.92k
    }
702
703
7.92k
    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
7.92k
    _rows_input_counter =
708
7.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.92k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.92k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.92k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.92k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.92k
    _memory_used_counter =
714
7.92k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.92k
    _common_profile->add_info_string("IsColocate",
716
7.92k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.92k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.92k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.92k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.92k
    return Status::OK();
721
7.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.77k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.77k
    _operator_profile =
664
8.77k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.77k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.77k
    _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.77k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.77k
    _operator_profile->add_child(_common_profile, true);
673
8.77k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.77k
    _operator_profile->set_metadata(_parent->node_id());
676
8.77k
    _wait_for_finish_dependency_timer =
677
8.77k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.77k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.77k
    if constexpr (!is_fake_shared) {
680
8.77k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.77k
            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.77k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.77k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.77k
            _dependency = _shared_state->create_sink_dependency(
697
8.77k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.77k
        }
699
8.77k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.77k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.77k
    }
702
703
8.77k
    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.77k
    _rows_input_counter =
708
8.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.77k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.77k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.77k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.77k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.77k
    _memory_used_counter =
714
8.77k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.77k
    _common_profile->add_info_string("IsColocate",
716
8.77k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.77k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.77k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.77k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.77k
    return Status::OK();
721
8.77k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
89.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
89.0k
    _operator_profile =
664
89.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
89.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
89.0k
    _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
89.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
89.0k
    _operator_profile->add_child(_common_profile, true);
673
89.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
89.0k
    _operator_profile->set_metadata(_parent->node_id());
676
89.0k
    _wait_for_finish_dependency_timer =
677
89.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
89.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
89.0k
    if constexpr (!is_fake_shared) {
680
89.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
89.0k
            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
89.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
89.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
89.0k
            _dependency = _shared_state->create_sink_dependency(
697
89.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
89.0k
        }
699
89.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
89.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
89.0k
    }
702
703
89.0k
    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
89.0k
    _rows_input_counter =
708
89.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
89.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
89.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
89.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
89.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
89.0k
    _memory_used_counter =
714
89.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
89.0k
    _common_profile->add_info_string("IsColocate",
716
89.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
89.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
89.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
89.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
89.0k
    return Status::OK();
721
89.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
66.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
66.5k
    _operator_profile =
664
66.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
66.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
66.5k
    _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
66.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
66.5k
    _operator_profile->add_child(_common_profile, true);
673
66.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
66.5k
    _operator_profile->set_metadata(_parent->node_id());
676
66.5k
    _wait_for_finish_dependency_timer =
677
66.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
66.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
66.5k
    if constexpr (!is_fake_shared) {
680
66.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
66.6k
            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
66.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
66.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
66.6k
                                                  ? 0
688
66.6k
                                                  : info.task_idx]
689
66.6k
                                  .get();
690
66.6k
            _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
66.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
66.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
66.5k
    }
702
703
66.5k
    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
66.5k
    _rows_input_counter =
708
66.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
66.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
66.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
66.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
66.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
66.5k
    _memory_used_counter =
714
66.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
66.5k
    _common_profile->add_info_string("IsColocate",
716
66.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
66.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
66.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
66.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
66.5k
    return Status::OK();
721
66.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
164
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
164
    _operator_profile =
664
164
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
164
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
164
    _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
164
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
164
    _operator_profile->add_child(_common_profile, true);
673
164
    _operator_profile->add_child(_custom_profile, true);
674
675
164
    _operator_profile->set_metadata(_parent->node_id());
676
164
    _wait_for_finish_dependency_timer =
677
164
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
164
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
164
    if constexpr (!is_fake_shared) {
680
164
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
164
            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
164
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
164
            _shared_state = info.shared_state->template cast<SharedState>();
696
164
            _dependency = _shared_state->create_sink_dependency(
697
164
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
164
        }
699
164
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
164
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
164
    }
702
703
164
    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
164
    _rows_input_counter =
708
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
164
    _memory_used_counter =
714
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
164
    _common_profile->add_info_string("IsColocate",
716
164
                                     std::to_string(_parent->is_colocated_operator()));
717
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
164
    return Status::OK();
721
164
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
439k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
439k
    _operator_profile =
664
439k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
439k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
439k
    _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
439k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
439k
    _operator_profile->add_child(_common_profile, true);
673
439k
    _operator_profile->add_child(_custom_profile, true);
674
675
439k
    _operator_profile->set_metadata(_parent->node_id());
676
439k
    _wait_for_finish_dependency_timer =
677
439k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
439k
    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
439k
    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
439k
    _rows_input_counter =
708
439k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
439k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
439k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
439k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
439k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
439k
    _memory_used_counter =
714
439k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
439k
    _common_profile->add_info_string("IsColocate",
716
439k
                                     std::to_string(_parent->is_colocated_operator()));
717
439k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
439k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
439k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
439k
    return Status::OK();
721
439k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.67k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.67k
    _operator_profile =
664
9.67k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.67k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.67k
    _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.67k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.67k
    _operator_profile->add_child(_common_profile, true);
673
9.67k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.67k
    _operator_profile->set_metadata(_parent->node_id());
676
9.67k
    _wait_for_finish_dependency_timer =
677
9.67k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.67k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.67k
    if constexpr (!is_fake_shared) {
680
9.67k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.67k
            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.67k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.67k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.67k
            _dependency = _shared_state->create_sink_dependency(
697
9.67k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.67k
        }
699
9.67k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.67k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.67k
    }
702
703
9.67k
    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.67k
    _rows_input_counter =
708
9.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.67k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.67k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.67k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.67k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.67k
    _memory_used_counter =
714
9.67k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.67k
    _common_profile->add_info_string("IsColocate",
716
9.67k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.67k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.67k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.67k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.67k
    return Status::OK();
721
9.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
490
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
490
    _operator_profile =
664
490
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
490
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
490
    _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
490
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
490
    _operator_profile->add_child(_common_profile, true);
673
490
    _operator_profile->add_child(_custom_profile, true);
674
675
490
    _operator_profile->set_metadata(_parent->node_id());
676
490
    _wait_for_finish_dependency_timer =
677
490
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
490
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
490
    if constexpr (!is_fake_shared) {
680
490
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
490
            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
490
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
490
            _shared_state = info.shared_state->template cast<SharedState>();
696
490
            _dependency = _shared_state->create_sink_dependency(
697
490
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
490
        }
699
490
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
490
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
490
    }
702
703
490
    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
490
    _rows_input_counter =
708
490
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
490
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
490
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
490
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
490
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
490
    _memory_used_counter =
714
490
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
490
    _common_profile->add_info_string("IsColocate",
716
490
                                     std::to_string(_parent->is_colocated_operator()));
717
490
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
490
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
490
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
490
    return Status::OK();
721
490
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.47k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.47k
    _operator_profile =
664
2.47k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.47k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.47k
    _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.47k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.47k
    _operator_profile->add_child(_common_profile, true);
673
2.47k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.47k
    _operator_profile->set_metadata(_parent->node_id());
676
2.47k
    _wait_for_finish_dependency_timer =
677
2.47k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.47k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.47k
    if constexpr (!is_fake_shared) {
680
2.47k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.47k
            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.47k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.47k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.47k
            _dependency = _shared_state->create_sink_dependency(
697
2.47k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.47k
        }
699
2.47k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.47k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.47k
    }
702
703
2.47k
    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.47k
    _rows_input_counter =
708
2.47k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.47k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.47k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.47k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.47k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.47k
    _memory_used_counter =
714
2.47k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.47k
    _common_profile->add_info_string("IsColocate",
716
2.47k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.47k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.47k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.47k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.47k
    return Status::OK();
721
2.47k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.7k
    _operator_profile =
664
12.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.7k
    _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.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.7k
    _operator_profile->add_child(_common_profile, true);
673
12.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.7k
    _operator_profile->set_metadata(_parent->node_id());
676
12.7k
    _wait_for_finish_dependency_timer =
677
12.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.7k
    if constexpr (!is_fake_shared) {
680
12.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.7k
            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.7k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.7k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.7k
            _dependency = _shared_state->create_sink_dependency(
697
12.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.7k
        }
699
12.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.7k
    }
702
703
12.7k
    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.7k
    _rows_input_counter =
708
12.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.7k
    _memory_used_counter =
714
12.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.7k
    _common_profile->add_info_string("IsColocate",
716
12.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.7k
    return Status::OK();
721
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
272k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
272k
    _operator_profile =
664
272k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
272k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
272k
    _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
272k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
272k
    _operator_profile->add_child(_common_profile, true);
673
272k
    _operator_profile->add_child(_custom_profile, true);
674
675
272k
    _operator_profile->set_metadata(_parent->node_id());
676
272k
    _wait_for_finish_dependency_timer =
677
272k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
272k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
272k
    if constexpr (!is_fake_shared) {
680
272k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
273k
            info.shared_state_map.end()) {
682
273k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
273k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
273k
            }
685
273k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
273k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
273k
                                                  ? 0
688
273k
                                                  : info.task_idx]
689
273k
                                  .get();
690
273k
            _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
272k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
272k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
272k
    }
702
703
272k
    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
272k
    _rows_input_counter =
708
272k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
272k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
272k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
272k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
272k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
272k
    _memory_used_counter =
714
272k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
272k
    _common_profile->add_info_string("IsColocate",
716
272k
                                     std::to_string(_parent->is_colocated_operator()));
717
272k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
272k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
272k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
272k
    return Status::OK();
721
272k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
399k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
399k
    _operator_profile =
664
399k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
399k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
399k
    _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
399k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
399k
    _operator_profile->add_child(_common_profile, true);
673
399k
    _operator_profile->add_child(_custom_profile, true);
674
675
399k
    _operator_profile->set_metadata(_parent->node_id());
676
399k
    _wait_for_finish_dependency_timer =
677
399k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
399k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
399k
    if constexpr (!is_fake_shared) {
680
399k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
399k
            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
399k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
399k
            _shared_state = info.shared_state->template cast<SharedState>();
696
399k
            _dependency = _shared_state->create_sink_dependency(
697
399k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
399k
        }
699
399k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
399k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
399k
    }
702
703
399k
    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
399k
    _rows_input_counter =
708
399k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
399k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
399k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
399k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
399k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
399k
    _memory_used_counter =
714
399k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
399k
    _common_profile->add_info_string("IsColocate",
716
399k
                                     std::to_string(_parent->is_colocated_operator()));
717
399k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
399k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
399k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
399k
    return Status::OK();
721
399k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
328
    _operator_profile =
664
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
328
    _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
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
328
    _operator_profile->add_child(_common_profile, true);
673
328
    _operator_profile->add_child(_custom_profile, true);
674
675
328
    _operator_profile->set_metadata(_parent->node_id());
676
328
    _wait_for_finish_dependency_timer =
677
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
328
    if constexpr (!is_fake_shared) {
680
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
328
            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
328
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
328
            _shared_state = info.shared_state->template cast<SharedState>();
696
328
            _dependency = _shared_state->create_sink_dependency(
697
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
328
        }
699
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
328
    }
702
703
328
    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
328
    _rows_input_counter =
708
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
328
    _memory_used_counter =
714
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
328
    _common_profile->add_info_string("IsColocate",
716
328
                                     std::to_string(_parent->is_colocated_operator()));
717
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
328
    return Status::OK();
721
328
}
722
723
template <typename SharedState>
724
1.59M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.59M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.59M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.15M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.15M
    }
731
1.59M
    _closed = true;
732
1.59M
    return Status::OK();
733
1.59M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
117k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
117k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
117k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
117k
    }
731
117k
    _closed = true;
732
117k
    return Status::OK();
733
117k
}
_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
160k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
160k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
160k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
160k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
160k
    }
731
160k
    _closed = true;
732
160k
    return Status::OK();
733
160k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
21
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
21
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
19
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
19
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
19
    }
731
19
    _closed = true;
732
19
    return Status::OK();
733
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.87k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.87k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.87k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.87k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.87k
    }
731
7.87k
    _closed = true;
732
7.87k
    return Status::OK();
733
7.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.74k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.74k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.74k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.74k
    }
731
8.74k
    _closed = true;
732
8.74k
    return Status::OK();
733
8.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
88.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
88.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
88.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
88.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
88.8k
    }
731
88.8k
    _closed = true;
732
88.8k
    return Status::OK();
733
88.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
66.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
66.2k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
66.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
66.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
66.2k
    }
731
66.2k
    _closed = true;
732
66.2k
    return Status::OK();
733
66.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
153
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
153
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
153
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
153
    }
731
153
    _closed = true;
732
153
    return Status::OK();
733
153
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
443k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
443k
    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
443k
    _closed = true;
732
443k
    return Status::OK();
733
443k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.71k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.71k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.71k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.71k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.71k
    }
731
9.71k
    _closed = true;
732
9.71k
    return Status::OK();
733
9.71k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
388
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
388
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
388
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
388
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
388
    }
731
388
    _closed = true;
732
388
    return Status::OK();
733
388
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.55k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.55k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.55k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.55k
    }
731
2.55k
    _closed = true;
732
2.55k
    return Status::OK();
733
2.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.7k
    }
731
12.7k
    _closed = true;
732
12.7k
    return Status::OK();
733
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
274k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
274k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
274k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
274k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
274k
    }
731
274k
    _closed = true;
732
274k
    return Status::OK();
733
274k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
401k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
401k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
401k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
401k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
401k
    }
731
401k
    _closed = true;
732
401k
    return Status::OK();
733
401k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
328
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
328
    }
731
328
    _closed = true;
732
328
    return Status::OK();
733
328
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
7.13k
                                                          bool* eos) {
738
7.13k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.12k
    return pull(state, block, eos);
740
7.13k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
7.09k
                                                          bool* eos) {
738
7.09k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.09k
    return pull(state, block, eos);
740
7.09k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
539k
                                                         bool* eos) {
745
539k
    auto& local_state = get_local_state(state);
746
539k
    if (need_more_input_data(state)) {
747
508k
        local_state._child_block->clear_column_data(
748
508k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
508k
                        .num_materialized_slots());
750
508k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
508k
                state, local_state._child_block.get(), &local_state._child_eos));
752
508k
        *eos = local_state._child_eos;
753
508k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
84.1k
            return Status::OK();
755
84.1k
        }
756
424k
        {
757
424k
            SCOPED_TIMER(local_state.exec_time_counter());
758
424k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
424k
        }
760
424k
    }
761
762
455k
    if (!need_more_input_data(state)) {
763
426k
        SCOPED_TIMER(local_state.exec_time_counter());
764
426k
        bool new_eos = false;
765
426k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
426k
        if (new_eos) {
767
351k
            *eos = true;
768
351k
        } else if (!need_more_input_data(state)) {
769
23.2k
            *eos = false;
770
23.2k
        }
771
426k
    }
772
455k
    return Status::OK();
773
455k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
140k
                                                         bool* eos) {
745
140k
    auto& local_state = get_local_state(state);
746
140k
    if (need_more_input_data(state)) {
747
122k
        local_state._child_block->clear_column_data(
748
122k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
122k
                        .num_materialized_slots());
750
122k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
122k
                state, local_state._child_block.get(), &local_state._child_eos));
752
122k
        *eos = local_state._child_eos;
753
122k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
40.4k
            return Status::OK();
755
40.4k
        }
756
82.0k
        {
757
82.0k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.0k
        }
760
82.0k
    }
761
762
100k
    if (!need_more_input_data(state)) {
763
100k
        SCOPED_TIMER(local_state.exec_time_counter());
764
100k
        bool new_eos = false;
765
100k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
100k
        if (new_eos) {
767
45.4k
            *eos = true;
768
55.0k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
100k
    }
772
100k
    return Status::OK();
773
100k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.52k
                                                         bool* eos) {
745
4.52k
    auto& local_state = get_local_state(state);
746
4.52k
    if (need_more_input_data(state)) {
747
2.66k
        local_state._child_block->clear_column_data(
748
2.66k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.66k
                        .num_materialized_slots());
750
2.66k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.66k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.66k
        *eos = local_state._child_eos;
753
2.66k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
522
            return Status::OK();
755
522
        }
756
2.14k
        {
757
2.14k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.14k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.14k
        }
760
2.14k
    }
761
762
4.01k
    if (!need_more_input_data(state)) {
763
4.01k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.01k
        bool new_eos = false;
765
4.01k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.01k
        if (new_eos) {
767
1.49k
            *eos = true;
768
2.51k
        } else if (!need_more_input_data(state)) {
769
1.86k
            *eos = false;
770
1.86k
        }
771
4.01k
    }
772
4.00k
    return Status::OK();
773
4.00k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.85k
                                                         bool* eos) {
745
1.85k
    auto& local_state = get_local_state(state);
746
1.86k
    if (need_more_input_data(state)) {
747
1.86k
        local_state._child_block->clear_column_data(
748
1.86k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.86k
                        .num_materialized_slots());
750
1.86k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.86k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.86k
        *eos = local_state._child_eos;
753
1.86k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
754
            return Status::OK();
755
754
        }
756
1.10k
        {
757
1.10k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.10k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.10k
        }
760
1.10k
    }
761
762
1.10k
    if (!need_more_input_data(state)) {
763
1.10k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.10k
        bool new_eos = false;
765
1.10k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.10k
        if (new_eos) {
767
774
            *eos = true;
768
774
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.10k
    }
772
1.10k
    return Status::OK();
773
1.10k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.8k
                                                         bool* eos) {
745
16.8k
    auto& local_state = get_local_state(state);
746
16.8k
    if (need_more_input_data(state)) {
747
16.8k
        local_state._child_block->clear_column_data(
748
16.8k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.8k
                        .num_materialized_slots());
750
16.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.8k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.8k
        *eos = local_state._child_eos;
753
16.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
4.09k
            return Status::OK();
755
4.09k
        }
756
12.7k
        {
757
12.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.7k
        }
760
12.7k
    }
761
762
12.7k
    if (!need_more_input_data(state)) {
763
6.55k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.55k
        bool new_eos = false;
765
6.55k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.55k
        if (new_eos) {
767
6.51k
            *eos = true;
768
6.51k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
6.55k
    }
772
12.7k
    return Status::OK();
773
12.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
344k
                                                         bool* eos) {
745
344k
    auto& local_state = get_local_state(state);
746
345k
    if (need_more_input_data(state)) {
747
345k
        local_state._child_block->clear_column_data(
748
345k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
345k
                        .num_materialized_slots());
750
345k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
345k
                state, local_state._child_block.get(), &local_state._child_eos));
752
345k
        *eos = local_state._child_eos;
753
345k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
36.9k
            return Status::OK();
755
36.9k
        }
756
308k
        {
757
308k
            SCOPED_TIMER(local_state.exec_time_counter());
758
308k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
308k
        }
760
308k
    }
761
762
307k
    if (!need_more_input_data(state)) {
763
286k
        SCOPED_TIMER(local_state.exec_time_counter());
764
286k
        bool new_eos = false;
765
286k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
286k
        if (new_eos) {
767
285k
            *eos = true;
768
285k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
286k
    }
772
307k
    return Status::OK();
773
307k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
23.9k
                                                         bool* eos) {
745
23.9k
    auto& local_state = get_local_state(state);
746
23.9k
    if (need_more_input_data(state)) {
747
13.6k
        local_state._child_block->clear_column_data(
748
13.6k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
13.6k
                        .num_materialized_slots());
750
13.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
13.6k
                state, local_state._child_block.get(), &local_state._child_eos));
752
13.6k
        *eos = local_state._child_eos;
753
13.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
750
            return Status::OK();
755
750
        }
756
12.8k
        {
757
12.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.8k
        }
760
12.8k
    }
761
762
23.1k
    if (!need_more_input_data(state)) {
763
22.6k
        SCOPED_TIMER(local_state.exec_time_counter());
764
22.6k
        bool new_eos = false;
765
22.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
22.6k
        if (new_eos) {
767
7.87k
            *eos = true;
768
14.8k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
22.6k
    }
772
23.1k
    return Status::OK();
773
23.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.57k
                                                         bool* eos) {
745
6.57k
    auto& local_state = get_local_state(state);
746
6.57k
    if (need_more_input_data(state)) {
747
6.21k
        local_state._child_block->clear_column_data(
748
6.21k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.21k
                        .num_materialized_slots());
750
6.21k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.21k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.21k
        *eos = local_state._child_eos;
753
6.21k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
687
            return Status::OK();
755
687
        }
756
5.52k
        {
757
5.52k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.52k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.52k
        }
760
5.52k
    }
761
762
5.89k
    if (!need_more_input_data(state)) {
763
5.89k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.89k
        bool new_eos = false;
765
5.89k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.89k
        if (new_eos) {
767
3.82k
            *eos = true;
768
3.82k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.89k
    }
772
5.88k
    return Status::OK();
773
5.88k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
46.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.1k
                                                         "AsyncWriterDependency", true);
781
46.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.1k
                             _finish_dependency));
783
784
46.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.1k
    return Status::OK();
787
46.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
378
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
378
    RETURN_IF_ERROR(Base::init(state, info));
779
378
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
378
                                                         "AsyncWriterDependency", true);
781
378
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
378
                             _finish_dependency));
783
784
378
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
378
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
378
    return Status::OK();
787
378
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
45.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.7k
                                                         "AsyncWriterDependency", true);
781
45.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.7k
                             _finish_dependency));
783
784
45.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.7k
    return Status::OK();
787
45.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
34
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
34
    RETURN_IF_ERROR(Base::init(state, info));
779
34
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
34
                                                         "AsyncWriterDependency", true);
781
34
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
34
                             _finish_dependency));
783
784
34
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
34
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
34
    return Status::OK();
787
34
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
46.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.7k
    RETURN_IF_ERROR(Base::open(state));
793
46.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
365k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
318k
        RETURN_IF_ERROR(
796
318k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
318k
    }
798
46.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.7k
    return Status::OK();
800
46.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
379
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
379
    RETURN_IF_ERROR(Base::open(state));
793
379
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.91k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.53k
        RETURN_IF_ERROR(
796
1.53k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.53k
    }
798
379
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
379
    return Status::OK();
800
379
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
46.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.3k
    RETURN_IF_ERROR(Base::open(state));
793
46.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
363k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
316k
        RETURN_IF_ERROR(
796
316k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
316k
    }
798
46.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.3k
    return Status::OK();
800
46.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
34
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
34
    RETURN_IF_ERROR(Base::open(state));
793
34
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
612
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
578
        RETURN_IF_ERROR(
796
578
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
578
    }
798
34
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
34
    return Status::OK();
800
34
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
62.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
62.3k
    return _writer->sink(block, eos);
806
62.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.59k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.59k
    return _writer->sink(block, eos);
806
1.59k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
60.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
60.7k
    return _writer->sink(block, eos);
806
60.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
34
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
34
    return _writer->sink(block, eos);
806
34
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
46.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.8k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.8k
    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
46.8k
    if (_writer) {
818
46.8k
        Status st = _writer->get_writer_status();
819
46.8k
        if (exec_status.ok()) {
820
46.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.8k
                                                       : Status::Cancelled("force close"));
822
46.8k
        } else {
823
69
            _writer->force_close(exec_status);
824
69
        }
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
46.8k
        RETURN_IF_ERROR(st);
829
46.8k
    }
830
46.8k
    return Base::close(state, exec_status);
831
46.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
367
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
367
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
367
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
367
    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
367
    if (_writer) {
818
367
        Status st = _writer->get_writer_status();
819
367
        if (exec_status.ok()) {
820
367
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
367
                                                       : Status::Cancelled("force close"));
822
367
        } 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
367
        RETURN_IF_ERROR(st);
829
367
    }
830
367
    return Base::close(state, exec_status);
831
367
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
46.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.4k
    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
46.4k
    if (_writer) {
818
46.4k
        Status st = _writer->get_writer_status();
819
46.4k
        if (exec_status.ok()) {
820
46.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.4k
                                                       : Status::Cancelled("force close"));
822
46.4k
        } else {
823
69
            _writer->force_close(exec_status);
824
69
        }
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
46.4k
        RETURN_IF_ERROR(st);
829
46.4k
    }
830
46.4k
    return Base::close(state, exec_status);
831
46.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
34
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
34
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
34
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
34
    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
34
    if (_writer) {
818
34
        Status st = _writer->get_writer_status();
819
34
        if (exec_status.ok()) {
820
34
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
34
                                                       : Status::Cancelled("force close"));
822
34
        } 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
34
        RETURN_IF_ERROR(st);
829
34
    }
830
34
    return Base::close(state, exec_status);
831
34
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
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(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris