Coverage Report

Created: 2026-09-30 09:26

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
2.04M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.04M
    if (_parent->nereids_id() == -1) {
122
1.08M
        return fmt::format("(id={})", _parent->node_id());
123
1.08M
    } else {
124
959k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
959k
    }
126
2.04M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
71.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
71.7k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
71.7k
    } else {
124
71.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
71.7k
    }
126
71.7k
}
_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
214k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
214k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
214k
    } else {
124
214k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
214k
    }
126
214k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
28
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
28
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
28
    } else {
124
28
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
28
    }
126
28
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.84k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.84k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.84k
    } else {
124
6.84k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.84k
    }
126
6.84k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
10.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
10.8k
    if (_parent->nereids_id() == -1) {
122
16
        return fmt::format("(id={})", _parent->node_id());
123
10.8k
    } else {
124
10.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
10.8k
    }
126
10.8k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
90.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
90.4k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
90.4k
    } else {
124
90.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
90.4k
    }
126
90.4k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
55.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
55.5k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
55.5k
    } else {
124
55.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
55.5k
    }
126
55.5k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
36
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
36
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
36
    } else {
124
36
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
36
    }
126
36
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
795k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
795k
    if (_parent->nereids_id() == -1) {
122
347k
        return fmt::format("(id={})", _parent->node_id());
123
448k
    } else {
124
448k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
448k
    }
126
795k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
55.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
55.2k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
55.2k
    } else {
124
55.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
55.2k
    }
126
55.2k
}
_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.53k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.54k
    if (_parent->nereids_id() == -1) {
122
5.54k
        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.53k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
615
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
615
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
513
    } else {
124
513
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
513
    }
126
615
}
_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
728k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
729k
    if (_parent->nereids_id() == -1) {
122
729k
        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
728k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
169
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
169
    } else {
124
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
169
    }
126
169
}
127
128
template <typename SharedStateArg>
129
1.29M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.29M
    if (_parent->nereids_id() == -1) {
131
783k
        return fmt::format("(id={})", _parent->node_id());
132
783k
    } else {
133
509k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
509k
    }
135
1.29M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
120k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
120k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
120k
    } else {
133
120k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
120k
    }
135
120k
}
_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
216k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
216k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
216k
    } else {
133
216k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
216k
    }
135
216k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
35
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
35
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
35
    } else {
133
35
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
35
    }
135
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.86k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.86k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.86k
    } else {
133
6.86k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.86k
    }
135
6.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
10.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
10.9k
    if (_parent->nereids_id() == -1) {
131
16
        return fmt::format("(id={})", _parent->node_id());
132
10.9k
    } else {
133
10.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
10.9k
    }
135
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
90.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
90.6k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
90.5k
    } else {
133
90.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
90.5k
    }
135
90.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
55.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
55.4k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
55.4k
    } else {
133
55.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
55.4k
    }
135
55.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
46
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
46
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
46
    } else {
133
46
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
46
    }
135
46
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6
    if (_parent->nereids_id() == -1) {
131
6
        return fmt::format("(id={})", _parent->node_id());
132
6
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
6
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
9.17k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
9.17k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
9.17k
    } else {
133
9.17k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
9.17k
    }
135
9.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
625
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
625
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
523
    } else {
133
523
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
523
    }
135
625
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.6k
    if (_parent->nereids_id() == -1) {
131
12.6k
        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.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
301k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
302k
    if (_parent->nereids_id() == -1) {
131
302k
        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
301k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
467k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
468k
    if (_parent->nereids_id() == -1) {
131
468k
        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
467k
}
_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
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
338
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
338
    } else {
133
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
338
    }
135
338
}
136
137
template <typename SharedStateArg>
138
30.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
30.8k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
30.8k
    _terminated = true;
143
30.8k
    return Status::OK();
144
30.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
3.40k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3.40k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3.40k
    _terminated = true;
143
3.40k
    return Status::OK();
144
3.40k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.72k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.72k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.72k
    _terminated = true;
143
1.72k
    return Status::OK();
144
1.72k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
479
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
479
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
479
    _terminated = true;
143
479
    return Status::OK();
144
479
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
380
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
380
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
380
    _terminated = true;
143
380
    return Status::OK();
144
380
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
288
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
288
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
288
    _terminated = true;
143
288
    return Status::OK();
144
288
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
140
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
140
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
140
    _terminated = true;
143
140
    return Status::OK();
144
140
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
4
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
4
    _terminated = true;
143
4
    return Status::OK();
144
4
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
257
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
257
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
257
    _terminated = true;
143
257
    return Status::OK();
144
257
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
128
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
128
    _terminated = true;
143
128
    return Status::OK();
144
128
}
145
146
310k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
310k
    return _child && _child->is_serial_operator() && !is_source()
148
310k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
310k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
310k
}
151
152
20.1k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
20.1k
    if (!_child) {
154
19.1k
        return false;
155
19.1k
    }
156
1.02k
    if (_child->is_serial_operator()) {
157
86
        return true;
158
86
    }
159
935
    const auto child_distribution = _child->required_data_distribution(state);
160
935
    return child_distribution.need_local_exchange() &&
161
935
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.02k
}
163
164
template <typename SharedStateArg>
165
16.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
16.7k
    fmt::memory_buffer debug_string_buffer;
167
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
16.7k
    return fmt::to_string(debug_string_buffer);
169
16.7k
}
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
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
5
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
5
    fmt::memory_buffer debug_string_buffer;
167
5
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
5
    return fmt::to_string(debug_string_buffer);
169
5
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
10
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
10
    fmt::memory_buffer debug_string_buffer;
167
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
10
    return fmt::to_string(debug_string_buffer);
169
10
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
16.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
16.7k
    fmt::memory_buffer debug_string_buffer;
167
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
16.7k
    return fmt::to_string(debug_string_buffer);
169
16.7k
}
_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
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
10
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
10
    fmt::memory_buffer debug_string_buffer;
167
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
10
    return fmt::to_string(debug_string_buffer);
169
10
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
16.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
16.7k
    fmt::memory_buffer debug_string_buffer;
174
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
16.7k
    return fmt::to_string(debug_string_buffer);
176
16.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
5
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
5
    fmt::memory_buffer debug_string_buffer;
174
5
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
5
    return fmt::to_string(debug_string_buffer);
176
5
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
10
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
10
    fmt::memory_buffer debug_string_buffer;
174
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
10
    return fmt::to_string(debug_string_buffer);
176
10
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
10
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
10
    fmt::memory_buffer debug_string_buffer;
174
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
10
    return fmt::to_string(debug_string_buffer);
176
10
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
6
    fmt::memory_buffer debug_string_buffer;
174
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
6
    return fmt::to_string(debug_string_buffer);
176
6
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
16.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
16.7k
    fmt::memory_buffer debug_string_buffer;
174
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
16.7k
    return fmt::to_string(debug_string_buffer);
176
16.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
16.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
16.8k
    fmt::memory_buffer debug_string_buffer;
180
16.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
16.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
16.8k
                   _is_serial_operator);
183
16.8k
    return fmt::to_string(debug_string_buffer);
184
16.8k
}
185
186
16.7k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
16.7k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
16.7k
}
189
190
689k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
689k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
689k
    _nereids_id = tnode.nereids_id;
193
689k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
5.58k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
5.58k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
5.58k
            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
5.58k
    }
206
689k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
689k
    _op_name = substr + "_OPERATOR";
208
209
689k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
689k
    } else if (tnode.__isset.conjuncts) {
212
277k
        for (const auto& conjunct : tnode.conjuncts) {
213
277k
            VExprContextSPtr context;
214
277k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
277k
            _conjuncts.emplace_back(context);
216
277k
        }
217
101k
    }
218
219
    // create the projections expr
220
689k
    if (tnode.__isset.projections) {
221
266k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
266k
    }
223
689k
    if (!tnode.intermediate_projections_list.empty()) {
224
5.58k
        DCHECK(has_projection()) << "no final projections";
225
5.58k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
9.25k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
9.25k
            VExprContextSPtrs projections;
228
9.25k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
9.25k
            _projection->intermediate_projections.push_back(projections);
230
9.25k
        }
231
5.58k
    }
232
689k
    return Status::OK();
233
689k
}
234
235
715k
Status OperatorXBase::prepare(RuntimeState* state) {
236
715k
    for (auto& conjunct : _conjuncts) {
237
276k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
276k
    }
239
715k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
665k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
341k
            return a->execute_cost() < b->execute_cost();
242
341k
        });
243
665k
    };
244
245
715k
    if (has_projection()) {
246
266k
        auto& projection = *_projection;
247
275k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
9.25k
            const auto& input_row_desc =
249
9.25k
                    i == 0 ? operator_row_desc_before_projection()
250
9.25k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
9.25k
            RETURN_IF_ERROR(
252
9.25k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
9.25k
        }
254
266k
        const auto& final_projection_input_row_desc =
255
266k
                projection.intermediate_output_row_descriptors.empty()
256
266k
                        ? operator_row_desc_before_projection()
257
266k
                        : projection.intermediate_output_row_descriptors.back();
258
266k
        RETURN_IF_ERROR(
259
266k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
266k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
266k
                                                      projection.output_row_descriptor));
262
266k
    }
263
264
715k
    for (auto& conjunct : _conjuncts) {
265
277k
        RETURN_IF_ERROR(conjunct->open(state));
266
277k
    }
267
715k
    if (has_projection()) {
268
266k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
266k
        for (auto& projections : _projection->intermediate_projections) {
270
9.25k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
9.25k
        }
272
266k
    }
273
715k
    if (_child && !is_source()) {
274
104k
        RETURN_IF_ERROR(_child->prepare(state));
275
104k
    }
276
277
715k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
715k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
715k
    return Status::OK();
283
715k
}
284
285
7.47k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.47k
    if (_child && !is_source()) {
287
607
        RETURN_IF_ERROR(_child->terminate(state));
288
607
    }
289
7.47k
    auto result = state->get_local_state_result(operator_id());
290
7.47k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.47k
    return result.value()->terminate(state);
294
7.47k
}
295
296
5.62M
Status OperatorXBase::close(RuntimeState* state) {
297
5.62M
    if (_child && !is_source()) {
298
1.04M
        RETURN_IF_ERROR(_child->close(state));
299
1.04M
    }
300
5.62M
    auto result = state->get_local_state_result(operator_id());
301
5.62M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
5.62M
    return result.value()->close(state);
305
5.62M
}
306
307
289k
void PipelineXLocalStateBase::clear_origin_block() {
308
289k
    _origin_block.clear_column_data(
309
289k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
289k
}
311
312
743k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
743k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
743k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
743k
    return Status::OK();
317
743k
}
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
290k
                                     Block* output_block) const {
326
290k
    auto* local_state = state->get_local_state(operator_id());
327
290k
    SCOPED_TIMER(local_state->exec_time_counter());
328
290k
    SCOPED_TIMER(local_state->_projection_timer);
329
290k
    const size_t rows = origin_block->rows();
330
290k
    if (rows == 0) {
331
155k
        return Status::OK();
332
155k
    }
333
134k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
134k
    {
336
134k
        Block input_block = *origin_block;
337
338
134k
        ColumnsWithTypeAndName new_columns;
339
134k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.13k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.13k
            new_columns.resize(projections.size());
345
51.2k
            for (int i = 0; i < projections.size(); i++) {
346
48.1k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
48.1k
                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
48.1k
            }
355
3.12k
            Block tmp_block {new_columns};
356
3.12k
            input_block.swap(tmp_block);
357
3.12k
        }
358
359
134k
        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
134k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
134k
                output_block, _projection->output_row_descriptor);
368
134k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
134k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
134k
        Columns shared_columns(mutable_columns.size());
371
372
770k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
636k
            ColumnPtr column_ptr;
374
636k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
636k
            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
636k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
636k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
636k
            if (column_ptr->is_exclusive()) {
386
225k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
411k
            } else {
388
411k
                shared_columns[i] = std::move(column_ptr);
389
411k
            }
390
636k
        }
391
392
134k
        scoped_mutable_block.restore();
393
771k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
636k
            if (shared_columns[i]) {
395
411k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
411k
            }
397
636k
        }
398
134k
    }
399
400
0
    origin_block->clear_column_data(
401
134k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
134k
    DCHECK_EQ(output_block->rows(), rows);
403
404
134k
    return Status::OK();
405
134k
}
406
407
4.34M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.34M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.34M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.34M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.34M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.34M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.34M
            if (_debug_point_count++ % 2 == 0) {
414
4.34M
                return Status::OK();
415
4.34M
            }
416
4.34M
        }
417
4.34M
    });
418
419
4.34M
    Status status;
420
4.34M
    auto* local_state = state->get_local_state(operator_id());
421
4.34M
    Defer defer([&]() {
422
4.33M
        if (status.ok()) {
423
4.33M
            local_state->update_output_block_counters(*block);
424
4.33M
        }
425
4.33M
    });
426
4.34M
    if (has_projection()) {
427
289k
        local_state->clear_origin_block();
428
289k
        status = get_block(state, &local_state->_origin_block, eos);
429
289k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
289k
        status = do_projections(state, &local_state->_origin_block, block);
433
289k
        return status;
434
289k
    }
435
4.05M
    status = get_block(state, block, eos);
436
4.05M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.05M
    return status;
438
4.05M
}
439
440
2.71M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.71M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.67k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.67k
        *eos = true;
444
9.67k
    }
445
446
2.71M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.71M
        auto op_name = to_lower(_parent->_op_name);
448
2.71M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.71M
        arg_op_name = to_lower(arg_op_name);
450
451
2.71M
        if (op_name == arg_op_name) {
452
2.71M
            *eos = true;
453
2.71M
        }
454
2.71M
    });
455
456
2.71M
    if (auto rows = block->rows()) {
457
739k
        _num_rows_returned += rows;
458
739k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
739k
    }
460
2.71M
}
461
462
30.8k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.8k
    auto result = state->get_sink_local_state_result();
464
30.8k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.8k
    return result.value()->terminate(state);
468
30.8k
}
469
470
16.7k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.7k
    fmt::memory_buffer debug_string_buffer;
472
473
16.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.7k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.7k
    return fmt::to_string(debug_string_buffer);
476
16.7k
}
477
478
16.7k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.7k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.7k
}
481
482
355k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
355k
    std::string op_name = "UNKNOWN_SINK";
484
355k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
355k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
355k
        op_name = it->second;
488
355k
    }
489
355k
    _name = op_name + "_OPERATOR";
490
355k
    return Status::OK();
491
355k
}
492
493
302k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
302k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
302k
    _nereids_id = tnode.nereids_id;
496
302k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
302k
    _name = substr + "_SINK_OPERATOR";
498
302k
    return Status::OK();
499
302k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.86M
                                                            LocalSinkStateInfo& info) {
504
1.86M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.86M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.86M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.86M
    return Status::OK();
508
1.86M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
120k
                                                            LocalSinkStateInfo& info) {
504
120k
    auto local_state = LocalStateType::create_unique(this, state);
505
120k
    RETURN_IF_ERROR(local_state->init(state, info));
506
120k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
120k
    return Status::OK();
508
120k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
422k
                                                            LocalSinkStateInfo& info) {
504
422k
    auto local_state = LocalStateType::create_unique(this, state);
505
422k
    RETURN_IF_ERROR(local_state->init(state, info));
506
422k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
422k
    return Status::OK();
508
422k
}
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
366
                                                            LocalSinkStateInfo& info) {
504
366
    auto local_state = LocalStateType::create_unique(this, state);
505
366
    RETURN_IF_ERROR(local_state->init(state, info));
506
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
366
    return Status::OK();
508
366
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46.9k
                                                            LocalSinkStateInfo& info) {
504
46.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
46.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
46.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46.9k
    return Status::OK();
508
46.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
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
10.9k
                                                            LocalSinkStateInfo& info) {
504
10.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.9k
    return Status::OK();
508
10.9k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_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_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
216k
                                                            LocalSinkStateInfo& info) {
504
216k
    auto local_state = LocalStateType::create_unique(this, state);
505
216k
    RETURN_IF_ERROR(local_state->init(state, info));
506
216k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
216k
    return Status::OK();
508
216k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
35
                                                            LocalSinkStateInfo& info) {
504
35
    auto local_state = LocalStateType::create_unique(this, state);
505
35
    RETURN_IF_ERROR(local_state->init(state, info));
506
35
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
35
    return Status::OK();
508
35
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
301k
                                                            LocalSinkStateInfo& info) {
504
301k
    auto local_state = LocalStateType::create_unique(this, state);
505
301k
    RETURN_IF_ERROR(local_state->init(state, info));
506
301k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
301k
    return Status::OK();
508
301k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
90.7k
                                                            LocalSinkStateInfo& info) {
504
90.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
90.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
90.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
90.7k
    return Status::OK();
508
90.7k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
55.4k
                                                            LocalSinkStateInfo& info) {
504
55.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
55.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
55.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
55.4k
    return Status::OK();
508
55.4k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46
                                                            LocalSinkStateInfo& info) {
504
46
    auto local_state = LocalStateType::create_unique(this, state);
505
46
    RETURN_IF_ERROR(local_state->init(state, info));
506
46
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46
    return Status::OK();
508
46
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
566k
                                                            LocalSinkStateInfo& info) {
504
566k
    auto local_state = LocalStateType::create_unique(this, state);
505
566k
    RETURN_IF_ERROR(local_state->init(state, info));
506
566k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566k
    return Status::OK();
508
566k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.86k
                                                            LocalSinkStateInfo& info) {
504
6.86k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.86k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.86k
    return Status::OK();
508
6.86k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.17k
                                                            LocalSinkStateInfo& info) {
504
9.17k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.17k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.17k
    return Status::OK();
508
9.17k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.35k
                                                            LocalSinkStateInfo& info) {
504
2.35k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.35k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.35k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.35k
    return Status::OK();
508
2.35k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
520
                                                            LocalSinkStateInfo& info) {
504
520
    auto local_state = LocalStateType::create_unique(this, state);
505
520
    RETURN_IF_ERROR(local_state->init(state, info));
506
520
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
520
    return Status::OK();
508
520
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.81k
                                                            LocalSinkStateInfo& info) {
504
4.81k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.81k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.81k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.81k
    return Status::OK();
508
4.81k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_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.53k
                                                            LocalSinkStateInfo& info) {
504
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.53k
    return Status::OK();
508
2.53k
}
_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
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.47M
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.47M
    } else {
519
1.47M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.47M
        ss->id = operator_id();
521
1.47M
        for (auto& dest : dests_id()) {
522
1.47M
            ss->related_op_ids.insert(dest);
523
1.47M
        }
524
1.47M
        return ss;
525
1.47M
    }
526
1.47M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106k
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
106k
    } else {
519
106k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106k
        ss->id = operator_id();
521
106k
        for (auto& dest : dests_id()) {
522
106k
            ss->related_op_ids.insert(dest);
523
106k
        }
524
106k
        return ss;
525
106k
    }
526
106k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
423k
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
423k
    } else {
519
423k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
423k
        ss->id = operator_id();
521
423k
        for (auto& dest : dests_id()) {
522
421k
            ss->related_op_ids.insert(dest);
523
421k
        }
524
423k
        return ss;
525
423k
    }
526
423k
}
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
365
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
365
    } else {
519
365
        auto ss = LocalStateType::SharedStateType::create_shared();
520
365
        ss->id = operator_id();
521
366
        for (auto& dest : dests_id()) {
522
366
            ss->related_op_ids.insert(dest);
523
366
        }
524
365
        return ss;
525
365
    }
526
365
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
47.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
47.0k
    } else {
519
47.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
47.0k
        ss->id = operator_id();
521
47.0k
        for (auto& dest : dests_id()) {
522
46.6k
            ss->related_op_ids.insert(dest);
523
46.6k
        }
524
47.0k
        return ss;
525
47.0k
    }
526
47.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
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
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
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
10.9k
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
10.9k
    } else {
519
10.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
10.9k
        ss->id = operator_id();
521
10.9k
        for (auto& dest : dests_id()) {
522
10.9k
            ss->related_op_ids.insert(dest);
523
10.9k
        }
524
10.9k
        return ss;
525
10.9k
    }
526
10.9k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_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_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
217k
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
217k
    } else {
519
217k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
217k
        ss->id = operator_id();
521
217k
        for (auto& dest : dests_id()) {
522
217k
            ss->related_op_ids.insert(dest);
523
217k
        }
524
217k
        return ss;
525
217k
    }
526
217k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
37
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
37
    } else {
519
37
        auto ss = LocalStateType::SharedStateType::create_shared();
520
37
        ss->id = operator_id();
521
37
        for (auto& dest : dests_id()) {
522
37
            ss->related_op_ids.insert(dest);
523
37
        }
524
37
        return ss;
525
37
    }
526
37
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
91.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
91.0k
    } else {
519
91.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
91.0k
        ss->id = operator_id();
521
91.1k
        for (auto& dest : dests_id()) {
522
91.1k
            ss->related_op_ids.insert(dest);
523
91.1k
        }
524
91.0k
        return ss;
525
91.0k
    }
526
91.0k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
45
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
45
    } else {
519
45
        auto ss = LocalStateType::SharedStateType::create_shared();
520
45
        ss->id = operator_id();
521
45
        for (auto& dest : dests_id()) {
522
45
            ss->related_op_ids.insert(dest);
523
45
        }
524
45
        return ss;
525
45
    }
526
45
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568k
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
568k
    } else {
519
568k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568k
        ss->id = operator_id();
521
568k
        for (auto& dest : dests_id()) {
522
563k
            ss->related_op_ids.insert(dest);
523
563k
        }
524
568k
        return ss;
525
568k
    }
526
568k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.89k
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
6.89k
    } else {
519
6.89k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.89k
        ss->id = operator_id();
521
6.89k
        for (auto& dest : dests_id()) {
522
6.89k
            ss->related_op_ids.insert(dest);
523
6.89k
        }
524
6.89k
        return ss;
525
6.89k
    }
526
6.89k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
627
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
627
    } else {
519
627
        auto ss = LocalStateType::SharedStateType::create_shared();
520
627
        ss->id = operator_id();
521
627
        for (auto& dest : dests_id()) {
522
622
            ss->related_op_ids.insert(dest);
523
622
        }
524
627
        return ss;
525
627
    }
526
627
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.65k
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.65k
    } else {
519
2.65k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.65k
        ss->id = operator_id();
521
2.65k
        for (auto& dest : dests_id()) {
522
2.65k
            ss->related_op_ids.insert(dest);
523
2.65k
        }
524
2.65k
        return ss;
525
2.65k
    }
526
2.65k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.54k
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.54k
    } else {
519
2.54k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.54k
        ss->id = operator_id();
521
2.54k
        for (auto& dest : dests_id()) {
522
2.54k
            ss->related_op_ids.insert(dest);
523
2.54k
        }
524
2.54k
        return ss;
525
2.54k
    }
526
2.54k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
565
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
565
    } else {
519
565
        auto ss = LocalStateType::SharedStateType::create_shared();
520
565
        ss->id = operator_id();
521
565
        for (auto& dest : dests_id()) {
522
554
            ss->related_op_ids.insert(dest);
523
554
        }
524
565
        return ss;
525
565
    }
526
565
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
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
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.31M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.31M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.31M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.31M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.31M
    return Status::OK();
534
2.31M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
72.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
72.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
72.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
72.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
72.0k
    return Status::OK();
534
72.0k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
249k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
249k
    auto local_state = LocalStateType::create_unique(state, this);
531
249k
    RETURN_IF_ERROR(local_state->init(state, info));
532
249k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
249k
    return Status::OK();
534
249k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
133
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
133
    auto local_state = LocalStateType::create_unique(state, this);
531
133
    RETURN_IF_ERROR(local_state->init(state, info));
532
133
    state->emplace_local_state(operator_id(), std::move(local_state));
533
133
    return Status::OK();
534
133
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.21k
    return Status::OK();
534
3.21k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.0k
    return Status::OK();
534
10.0k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
28
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
28
    auto local_state = LocalStateType::create_unique(state, this);
531
28
    RETURN_IF_ERROR(local_state->init(state, info));
532
28
    state->emplace_local_state(operator_id(), std::move(local_state));
533
28
    return Status::OK();
534
28
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
206k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
206k
    auto local_state = LocalStateType::create_unique(state, this);
531
206k
    RETURN_IF_ERROR(local_state->init(state, info));
532
206k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
206k
    return Status::OK();
534
206k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
90.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
90.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
90.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
90.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
90.8k
    return Status::OK();
534
90.8k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.5k
    return Status::OK();
534
55.5k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
36
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
36
    auto local_state = LocalStateType::create_unique(state, this);
531
36
    RETURN_IF_ERROR(local_state->init(state, info));
532
36
    state->emplace_local_state(operator_id(), std::move(local_state));
533
36
    return Status::OK();
534
36
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.68k
    return Status::OK();
534
4.68k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
350k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
350k
    auto local_state = LocalStateType::create_unique(state, this);
531
350k
    RETURN_IF_ERROR(local_state->init(state, info));
532
350k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
350k
    return Status::OK();
534
350k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.12k
    return Status::OK();
534
1.12k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.86k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.86k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.86k
    return Status::OK();
534
6.86k
}
_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.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.54k
    return Status::OK();
534
1.54k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.3k
    return Status::OK();
534
55.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.55k
    return Status::OK();
534
5.55k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
518
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
518
    auto local_state = LocalStateType::create_unique(state, this);
531
518
    RETURN_IF_ERROR(local_state->init(state, info));
532
518
    state->emplace_local_state(operator_id(), std::move(local_state));
533
518
    return Status::OK();
534
518
}
_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
412
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
412
    auto local_state = LocalStateType::create_unique(state, this);
531
412
    RETURN_IF_ERROR(local_state->init(state, info));
532
412
    state->emplace_local_state(operator_id(), std::move(local_state));
533
412
    return Status::OK();
534
412
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.68k
    return Status::OK();
534
1.68k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.5k
    return Status::OK();
534
10.5k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
735k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
735k
    auto local_state = LocalStateType::create_unique(state, this);
531
735k
    RETURN_IF_ERROR(local_state->init(state, info));
532
735k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
735k
    return Status::OK();
534
735k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
788
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
788
    auto local_state = LocalStateType::create_unique(state, this);
531
788
    RETURN_IF_ERROR(local_state->init(state, info));
532
788
    state->emplace_local_state(operator_id(), std::move(local_state));
533
788
    return Status::OK();
534
788
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
947
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
947
    auto local_state = LocalStateType::create_unique(state, this);
531
947
    RETURN_IF_ERROR(local_state->init(state, info));
532
947
    state->emplace_local_state(operator_id(), std::move(local_state));
533
947
    return Status::OK();
534
947
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.37k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.37k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.37k
    return Status::OK();
534
8.37k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
420k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
420k
    auto local_state = LocalStateType::create_unique(state, this);
531
420k
    RETURN_IF_ERROR(local_state->init(state, info));
532
420k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
420k
    return Status::OK();
534
420k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.86M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.29M
        : _num_rows_returned(0),
542
2.29M
          _rows_returned_counter(nullptr),
543
2.29M
          _parent(parent),
544
2.29M
          _state(state),
545
2.29M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.31M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.31M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.31M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.31M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.31M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.31M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.31M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.31M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.31M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.31M
    if constexpr (!is_fake_shared) {
560
1.25M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
800k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
800k
                                    .first.get()
563
800k
                                    ->template cast<SharedStateArg>();
564
565
800k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
800k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
800k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
800k
        } else if (info.shared_state) {
569
392k
            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
392k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
392k
            _dependency = _shared_state->create_source_dependency(
576
392k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
392k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
392k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
392k
        } else {
580
67.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.40k
                DCHECK(false);
582
7.40k
            }
583
67.3k
        }
584
1.25M
    }
585
586
2.31M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.31M
    _rows_returned_counter =
591
2.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.31M
    _blocks_returned_counter =
593
2.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.31M
    _output_block_bytes_counter =
595
2.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.31M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.31M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.31M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.31M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.31M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.31M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.31M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.31M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.31M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.31M
    _memory_used_counter =
606
2.31M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.31M
    _common_profile->add_info_string("IsColocate",
608
2.31M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.31M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.31M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.31M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.31M
    return Status::OK();
613
2.31M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
72.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
72.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
72.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
72.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
72.2k
    _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
72.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
72.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
72.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
72.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
72.2k
    if constexpr (!is_fake_shared) {
560
72.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.3k
                                    .first.get()
563
13.3k
                                    ->template cast<SharedStateArg>();
564
565
13.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
58.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
57.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
57.9k
            _dependency = _shared_state->create_source_dependency(
576
57.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
57.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
57.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
57.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
939
        }
584
72.2k
    }
585
586
72.2k
    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
72.2k
    _rows_returned_counter =
591
72.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
72.2k
    _blocks_returned_counter =
593
72.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
72.2k
    _output_block_bytes_counter =
595
72.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
72.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
72.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
72.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
72.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
72.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
72.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
72.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
72.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
72.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
72.2k
    _memory_used_counter =
606
72.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
72.2k
    _common_profile->add_info_string("IsColocate",
608
72.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
72.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
72.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
72.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
72.2k
    return Status::OK();
613
72.2k
}
_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
217k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
217k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
217k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
217k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
217k
    _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
217k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
217k
    _operator_profile->add_child(_common_profile.get(), true);
557
217k
    _operator_profile->add_child(_custom_profile.get(), true);
558
217k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
217k
    if constexpr (!is_fake_shared) {
560
217k
        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
217k
        } 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
211k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
211k
            _dependency = _shared_state->create_source_dependency(
576
211k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
211k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
211k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
211k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6.04k
        }
584
217k
    }
585
586
217k
    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
217k
    _rows_returned_counter =
591
217k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
217k
    _blocks_returned_counter =
593
217k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
217k
    _output_block_bytes_counter =
595
217k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
217k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
217k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
217k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
217k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
217k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
217k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
217k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
217k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
217k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
217k
    _memory_used_counter =
606
217k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
217k
    _common_profile->add_info_string("IsColocate",
608
217k
                                     std::to_string(_parent->is_colocated_operator()));
609
217k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
217k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
217k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
217k
    return Status::OK();
613
217k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
28
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
28
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
28
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
28
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
28
    _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
28
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
28
    _operator_profile->add_child(_common_profile.get(), true);
557
28
    _operator_profile->add_child(_custom_profile.get(), true);
558
28
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
28
    if constexpr (!is_fake_shared) {
560
28
        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
28
        } 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
28
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
28
            _dependency = _shared_state->create_source_dependency(
576
28
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
28
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
28
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
28
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
28
    }
585
586
28
    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
28
    _rows_returned_counter =
591
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
28
    _blocks_returned_counter =
593
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
28
    _output_block_bytes_counter =
595
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
28
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
28
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
28
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
28
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
28
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
28
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
28
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
28
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
28
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
28
    _memory_used_counter =
606
28
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
28
    _common_profile->add_info_string("IsColocate",
608
28
                                     std::to_string(_parent->is_colocated_operator()));
609
28
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
28
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
28
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
28
    return Status::OK();
613
28
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.90k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.90k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.90k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.90k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.90k
    _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.90k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.90k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.90k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.90k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.90k
    if constexpr (!is_fake_shared) {
560
6.90k
        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.90k
        } 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
6.81k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.81k
            _dependency = _shared_state->create_source_dependency(
576
6.81k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.81k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.81k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.81k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
88
        }
584
6.90k
    }
585
586
6.90k
    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.90k
    _rows_returned_counter =
591
6.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.90k
    _blocks_returned_counter =
593
6.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.90k
    _output_block_bytes_counter =
595
6.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.90k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.90k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.90k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.90k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.90k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.90k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.90k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.90k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.90k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.90k
    _memory_used_counter =
606
6.90k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.90k
    _common_profile->add_info_string("IsColocate",
608
6.90k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.90k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.90k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.90k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.90k
    return Status::OK();
613
6.90k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
10.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
10.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
10.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
10.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
10.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
10.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
10.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
10.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
10.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
10.9k
    if constexpr (!is_fake_shared) {
560
10.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
10.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
10.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
10.8k
            _dependency = _shared_state->create_source_dependency(
576
10.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
10.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
10.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
86
        }
584
10.9k
    }
585
586
10.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
10.9k
    _rows_returned_counter =
591
10.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
10.9k
    _blocks_returned_counter =
593
10.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
10.9k
    _output_block_bytes_counter =
595
10.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
10.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
10.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
10.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
10.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
10.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
10.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
10.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
10.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
10.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
10.9k
    _memory_used_counter =
606
10.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
10.9k
    _common_profile->add_info_string("IsColocate",
608
10.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
10.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
10.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
10.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
10.9k
    return Status::OK();
613
10.9k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
91.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
91.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
91.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
91.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
91.1k
    _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
91.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
91.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
91.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
91.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
91.1k
    if constexpr (!is_fake_shared) {
560
91.1k
        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
91.1k
        } 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
89.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
89.5k
            _dependency = _shared_state->create_source_dependency(
576
89.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
89.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
89.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
89.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.57k
        }
584
91.1k
    }
585
586
91.1k
    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
91.1k
    _rows_returned_counter =
591
91.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
91.1k
    _blocks_returned_counter =
593
91.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
91.1k
    _output_block_bytes_counter =
595
91.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
91.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
91.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
91.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
91.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
91.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
91.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
91.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
91.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
91.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
91.1k
    _memory_used_counter =
606
91.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
91.1k
    _common_profile->add_info_string("IsColocate",
608
91.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
91.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
91.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
91.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
91.1k
    return Status::OK();
613
91.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.6k
    _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
55.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.6k
    if constexpr (!is_fake_shared) {
560
55.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
55.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
55.6k
                                    .first.get()
563
55.6k
                                    ->template cast<SharedStateArg>();
564
565
55.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
55.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
55.6k
                    _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
55.6k
    }
585
586
55.6k
    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
55.6k
    _rows_returned_counter =
591
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.6k
    _blocks_returned_counter =
593
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.6k
    _output_block_bytes_counter =
595
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.6k
    _memory_used_counter =
606
55.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.6k
    _common_profile->add_info_string("IsColocate",
608
55.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.6k
    return Status::OK();
613
55.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
36
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
36
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
36
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
36
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
36
    _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
36
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
36
    _operator_profile->add_child(_common_profile.get(), true);
557
36
    _operator_profile->add_child(_custom_profile.get(), true);
558
36
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
36
    if constexpr (!is_fake_shared) {
560
36
        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
36
        } 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
36
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
36
            _dependency = _shared_state->create_source_dependency(
576
36
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
36
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
36
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
36
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
36
    }
585
586
36
    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
36
    _rows_returned_counter =
591
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
36
    _blocks_returned_counter =
593
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
36
    _output_block_bytes_counter =
595
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
36
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
36
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
36
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
36
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
36
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
36
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
36
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
36
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
36
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
36
    _memory_used_counter =
606
36
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
36
    _common_profile->add_info_string("IsColocate",
608
36
                                     std::to_string(_parent->is_colocated_operator()));
609
36
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
36
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
36
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
36
    return Status::OK();
613
36
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.05M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.05M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.05M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.05M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.05M
    _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.05M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.05M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.05M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.05M
    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
1.05M
    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.05M
    _rows_returned_counter =
591
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.05M
    _blocks_returned_counter =
593
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.05M
    _output_block_bytes_counter =
595
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.05M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.05M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.05M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.05M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.05M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.05M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.05M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.05M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.05M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.05M
    _memory_used_counter =
606
1.05M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.05M
    _common_profile->add_info_string("IsColocate",
608
1.05M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.05M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.05M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.05M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.05M
    return Status::OK();
613
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.2k
    _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
55.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.2k
    if constexpr (!is_fake_shared) {
560
55.2k
        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
55.2k
        } 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.16k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.16k
            _dependency = _shared_state->create_source_dependency(
576
4.16k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.16k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.16k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.1k
        }
584
55.2k
    }
585
586
55.2k
    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
55.2k
    _rows_returned_counter =
591
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.2k
    _blocks_returned_counter =
593
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.2k
    _output_block_bytes_counter =
595
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.2k
    _memory_used_counter =
606
55.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.2k
    _common_profile->add_info_string("IsColocate",
608
55.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.2k
    return Status::OK();
613
55.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.56k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.56k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.56k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.56k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.56k
    _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.56k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.56k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.56k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.56k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.56k
    if constexpr (!is_fake_shared) {
560
5.56k
        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.56k
        } 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.50k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.50k
            _dependency = _shared_state->create_source_dependency(
576
5.50k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.50k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.50k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.50k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
64
        }
584
5.56k
    }
585
586
5.56k
    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.56k
    _rows_returned_counter =
591
5.56k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.56k
    _blocks_returned_counter =
593
5.56k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.56k
    _output_block_bytes_counter =
595
5.56k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.56k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.56k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.56k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.56k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.56k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.56k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.56k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.56k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.56k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.56k
    _memory_used_counter =
606
5.56k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.56k
    _common_profile->add_info_string("IsColocate",
608
5.56k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.56k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.56k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.56k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.56k
    return Status::OK();
613
5.56k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
623
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
623
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
623
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
623
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
623
    _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
623
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
623
    _operator_profile->add_child(_common_profile.get(), true);
557
623
    _operator_profile->add_child(_custom_profile.get(), true);
558
623
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
623
    if constexpr (!is_fake_shared) {
560
623
        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
623
        } 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
616
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
616
            _dependency = _shared_state->create_source_dependency(
576
616
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
616
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
616
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
616
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
7
        }
584
623
    }
585
586
623
    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
623
    _rows_returned_counter =
591
623
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
623
    _blocks_returned_counter =
593
623
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
623
    _output_block_bytes_counter =
595
623
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
623
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
623
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
623
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
623
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
623
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
623
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
623
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
623
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
623
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
623
    _memory_used_counter =
606
623
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
623
    _common_profile->add_info_string("IsColocate",
608
623
                                     std::to_string(_parent->is_colocated_operator()));
609
623
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
623
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
623
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
623
    return Status::OK();
613
623
}
_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.20k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.20k
            _dependency = _shared_state->create_source_dependency(
576
5.20k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.20k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.20k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.20k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49
        }
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
738k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
738k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
738k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
738k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
738k
    _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
738k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
738k
    _operator_profile->add_child(_common_profile.get(), true);
557
738k
    _operator_profile->add_child(_custom_profile.get(), true);
558
738k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
738k
    if constexpr (!is_fake_shared) {
560
738k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
731k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
731k
                                    .first.get()
563
731k
                                    ->template cast<SharedStateArg>();
564
565
731k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
731k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
731k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
731k
        } 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
7.40k
        } else {
580
7.40k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.40k
                DCHECK(false);
582
7.40k
            }
583
7.40k
        }
584
738k
    }
585
586
738k
    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
738k
    _rows_returned_counter =
591
738k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
738k
    _blocks_returned_counter =
593
738k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
738k
    _output_block_bytes_counter =
595
738k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
738k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
738k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
738k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
738k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
738k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
738k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
738k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
738k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
738k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
738k
    _memory_used_counter =
606
738k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
738k
    _common_profile->add_info_string("IsColocate",
608
738k
                                     std::to_string(_parent->is_colocated_operator()));
609
738k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
738k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
738k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
738k
    return Status::OK();
613
738k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.32M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.32M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.63M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
307k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
307k
    }
621
2.32M
    if (_parent->has_projection()) {
622
390k
        const auto& projection = *_parent->_projection;
623
390k
        _projections.resize(projection.projections.size());
624
2.41M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.01M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.01M
        }
627
390k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
408k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
17.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
185k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
168k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
168k
                        state, _intermediate_projections[i][j]));
633
168k
            }
634
17.7k
        }
635
390k
    }
636
2.32M
    return Status::OK();
637
2.32M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
72.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
72.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
73.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.46k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.46k
    }
621
72.4k
    if (_parent->has_projection()) {
622
72.4k
        const auto& projection = *_parent->_projection;
623
72.4k
        _projections.resize(projection.projections.size());
624
388k
        for (size_t i = 0; i < _projections.size(); i++) {
625
316k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
316k
        }
627
72.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
77.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
4.99k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
108k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
103k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
103k
                        state, _intermediate_projections[i][j]));
633
103k
            }
634
4.99k
        }
635
72.4k
    }
636
72.4k
    return Status::OK();
637
72.4k
}
_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
218k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
218k
    _conjuncts.resize(_parent->_conjuncts.size());
618
218k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
218k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
402
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        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
80
    }
636
218k
    return Status::OK();
637
218k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
28
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
28
    _conjuncts.resize(_parent->_conjuncts.size());
618
28
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
28
    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
28
    return Status::OK();
637
28
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.91k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.91k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.04k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
134
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
134
    }
621
6.91k
    if (_parent->has_projection()) {
622
6.91k
        const auto& projection = *_parent->_projection;
623
6.91k
        _projections.resize(projection.projections.size());
624
29.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
23.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
23.0k
        }
627
6.91k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.96k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
55
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
470
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
415
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
415
                        state, _intermediate_projections[i][j]));
633
415
            }
634
55
        }
635
6.91k
    }
636
6.91k
    return Status::OK();
637
6.91k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
10.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
10.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
12.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.09k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.09k
    }
621
10.9k
    if (_parent->has_projection()) {
622
5.71k
        const auto& projection = *_parent->_projection;
623
5.71k
        _projections.resize(projection.projections.size());
624
24.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
18.3k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
18.3k
        }
627
5.71k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.82k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
113
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
874
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
761
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
761
                        state, _intermediate_projections[i][j]));
633
761
            }
634
113
        }
635
5.71k
    }
636
10.9k
    return Status::OK();
637
10.9k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
91.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
91.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
92.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.44k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.44k
    }
621
91.2k
    if (_parent->has_projection()) {
622
30.1k
        const auto& projection = *_parent->_projection;
623
30.1k
        _projections.resize(projection.projections.size());
624
274k
        for (size_t i = 0; i < _projections.size(); i++) {
625
244k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
244k
        }
627
30.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
172
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.16k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
993
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
993
                        state, _intermediate_projections[i][j]));
633
993
            }
634
172
        }
635
30.1k
    }
636
91.2k
    return Status::OK();
637
91.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
55.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
55.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
55.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
5
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
5
    }
621
55.6k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
643
        for (size_t i = 0; i < _projections.size(); i++) {
625
509
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
509
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
136
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
9
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
9
                        state, _intermediate_projections[i][j]));
633
9
            }
634
2
        }
635
134
    }
636
55.6k
    return Status::OK();
637
55.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
40
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
40
    _conjuncts.resize(_parent->_conjuncts.size());
618
40
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
40
    if (_parent->has_projection()) {
622
12
        const auto& projection = *_parent->_projection;
623
12
        _projections.resize(projection.projections.size());
624
36
        for (size_t i = 0; i < _projections.size(); i++) {
625
24
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
24
        }
627
12
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12
        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
12
    }
636
40
    return Status::OK();
637
40
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.05M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.05M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.36M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
302k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
302k
    }
621
1.05M
    if (_parent->has_projection()) {
622
263k
        const auto& projection = *_parent->_projection;
623
263k
        _projections.resize(projection.projections.size());
624
1.58M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.31M
        }
627
263k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
275k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
12.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
71.6k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
59.3k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
59.3k
                        state, _intermediate_projections[i][j]));
633
59.3k
            }
634
12.2k
        }
635
263k
    }
636
1.05M
    return Status::OK();
637
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
55.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
55.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
55.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
55.5k
    if (_parent->has_projection()) {
622
11.5k
        const auto& projection = *_parent->_projection;
623
11.5k
        _projections.resize(projection.projections.size());
624
110k
        for (size_t i = 0; i < _projections.size(); i++) {
625
99.3k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
99.3k
        }
627
11.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
168
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.28k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.11k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.11k
                        state, _intermediate_projections[i][j]));
633
3.11k
            }
634
168
        }
635
11.5k
    }
636
55.5k
    return Status::OK();
637
55.5k
}
_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.54k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.54k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.87k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
330
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
330
    }
621
5.54k
    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.54k
    return Status::OK();
637
5.54k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
629
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
629
    _conjuncts.resize(_parent->_conjuncts.size());
618
629
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
629
    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
629
    return Status::OK();
637
629
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.25k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.25k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.25k
    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.25k
    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.25k
    return Status::OK();
637
5.25k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
743k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
743k
    _conjuncts.resize(_parent->_conjuncts.size());
618
743k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
743k
    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
743k
    return Status::OK();
637
743k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
7.47k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.47k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.47k
    _terminated = true;
645
7.47k
    return Status::OK();
646
7.47k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
350
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
350
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
350
    _terminated = true;
645
350
    return Status::OK();
646
350
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
40
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
40
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
40
    _terminated = true;
645
40
    return Status::OK();
646
40
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
_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
99
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
99
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
99
    _terminated = true;
645
99
    return Status::OK();
646
99
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.00k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.00k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.00k
    _terminated = true;
645
6.00k
    return Status::OK();
646
6.00k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_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
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
884
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
884
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
884
    _terminated = true;
645
884
    return Status::OK();
646
884
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
34
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
34
    _terminated = true;
645
34
    return Status::OK();
646
34
}
647
648
template <typename SharedStateArg>
649
2.57M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.57M
    if (_closed) {
651
249k
        return Status::OK();
652
249k
    }
653
2.32M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.26M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.26M
    }
656
2.32M
    _closed = true;
657
2.32M
    return Status::OK();
658
2.57M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
72.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
72.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
72.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
72.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
72.3k
    }
656
72.3k
    _closed = true;
657
72.3k
    return Status::OK();
658
72.3k
}
_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
432k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
432k
    if (_closed) {
651
217k
        return Status::OK();
652
217k
    }
653
215k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
215k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
215k
    }
656
215k
    _closed = true;
657
215k
    return Status::OK();
658
432k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
28
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
28
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
28
    }
656
28
    _closed = true;
657
28
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.90k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.90k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.90k
    }
656
6.90k
    _closed = true;
657
6.90k
    return Status::OK();
658
6.90k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
22.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
22.0k
    if (_closed) {
651
11.1k
        return Status::OK();
652
11.1k
    }
653
10.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
10.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
10.9k
    }
656
10.9k
    _closed = true;
657
10.9k
    return Status::OK();
658
22.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
91.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
91.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
91.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
91.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
91.1k
    }
656
91.1k
    _closed = true;
657
91.1k
    return Status::OK();
658
91.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.3k
    }
656
55.3k
    _closed = true;
657
55.3k
    return Status::OK();
658
55.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
35
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
35
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
35
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
35
    }
656
35
    _closed = true;
657
35
    return Status::OK();
658
35
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.07M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.07M
    if (_closed) {
651
15.0k
        return Status::OK();
652
15.0k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.06M
    _closed = true;
657
1.06M
    return Status::OK();
658
1.07M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.5k
    }
656
55.5k
    _closed = true;
657
55.5k
    return Status::OK();
658
55.5k
}
_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.53k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.53k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.53k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.53k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.53k
    }
656
5.53k
    _closed = true;
657
5.53k
    return Status::OK();
658
5.53k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.05k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.05k
    if (_closed) {
651
527
        return Status::OK();
652
527
    }
653
526
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
526
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
526
    }
656
526
    _closed = true;
657
526
    return Status::OK();
658
1.05k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.5k
    if (_closed) {
651
5.34k
        return Status::OK();
652
5.34k
    }
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.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
744k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
744k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
744k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
744k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
744k
    }
656
744k
    _closed = true;
657
744k
    return Status::OK();
658
744k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
333
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
333
    if (_closed) {
651
173
        return Status::OK();
652
173
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
333
}
659
660
template <typename SharedState>
661
1.87M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.87M
    _operator_profile =
664
1.87M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.87M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.87M
    _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.87M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.87M
    _operator_profile->add_child(_common_profile, true);
673
1.87M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.87M
    _operator_profile->set_metadata(_parent->node_id());
676
1.87M
    _wait_for_finish_dependency_timer =
677
1.87M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.87M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.87M
    if constexpr (!is_fake_shared) {
680
1.30M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.30M
            info.shared_state_map.end()) {
682
372k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
302k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
302k
            }
685
372k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
372k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
372k
                                                  ? 0
688
372k
                                                  : info.task_idx]
689
372k
                                  .get();
690
372k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
929k
        } else {
692
929k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
38
                DCHECK(false);
694
38
            }
695
929k
            _shared_state = info.shared_state->template cast<SharedState>();
696
929k
            _dependency = _shared_state->create_sink_dependency(
697
929k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
929k
        }
699
1.30M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.30M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.30M
    }
702
703
1.87M
    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.87M
    _rows_input_counter =
708
1.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.87M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.87M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.87M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.87M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.87M
    _memory_used_counter =
714
1.87M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.87M
    _common_profile->add_info_string("IsColocate",
716
1.87M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.87M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.87M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.87M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.87M
    return Status::OK();
721
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
120k
    _operator_profile =
664
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
120k
    _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
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
120k
    _operator_profile->add_child(_common_profile, true);
673
120k
    _operator_profile->add_child(_custom_profile, true);
674
675
120k
    _operator_profile->set_metadata(_parent->node_id());
676
120k
    _wait_for_finish_dependency_timer =
677
120k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
120k
    if constexpr (!is_fake_shared) {
680
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
120k
            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
13.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
13.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
13.7k
                                                  ? 0
688
13.7k
                                                  : info.task_idx]
689
13.7k
                                  .get();
690
13.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
106k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
106k
            _shared_state = info.shared_state->template cast<SharedState>();
696
106k
            _dependency = _shared_state->create_sink_dependency(
697
106k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
106k
        }
699
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
120k
    }
702
703
120k
    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
120k
    _rows_input_counter =
708
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
120k
    _memory_used_counter =
714
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
120k
    _common_profile->add_info_string("IsColocate",
716
120k
                                     std::to_string(_parent->is_colocated_operator()));
717
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
120k
    return Status::OK();
721
120k
}
_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
217k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
217k
    _operator_profile =
664
217k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
217k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
217k
    _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
217k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
217k
    _operator_profile->add_child(_common_profile, true);
673
217k
    _operator_profile->add_child(_custom_profile, true);
674
675
217k
    _operator_profile->set_metadata(_parent->node_id());
676
217k
    _wait_for_finish_dependency_timer =
677
217k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
217k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
217k
    if constexpr (!is_fake_shared) {
680
217k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
217k
            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
217k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
217k
            _shared_state = info.shared_state->template cast<SharedState>();
696
217k
            _dependency = _shared_state->create_sink_dependency(
697
217k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
217k
        }
699
217k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
217k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
217k
    }
702
703
217k
    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
217k
    _rows_input_counter =
708
217k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
217k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
217k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
217k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
217k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
217k
    _memory_used_counter =
714
217k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
217k
    _common_profile->add_info_string("IsColocate",
716
217k
                                     std::to_string(_parent->is_colocated_operator()));
717
217k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
217k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
217k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
217k
    return Status::OK();
721
217k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
35
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
35
    _operator_profile =
664
35
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
35
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
35
    _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
35
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
35
    _operator_profile->add_child(_common_profile, true);
673
35
    _operator_profile->add_child(_custom_profile, true);
674
675
35
    _operator_profile->set_metadata(_parent->node_id());
676
35
    _wait_for_finish_dependency_timer =
677
35
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
35
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
35
    if constexpr (!is_fake_shared) {
680
35
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
35
            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
35
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
35
            _shared_state = info.shared_state->template cast<SharedState>();
696
35
            _dependency = _shared_state->create_sink_dependency(
697
35
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
35
        }
699
35
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
35
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
35
    }
702
703
35
    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
35
    _rows_input_counter =
708
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
35
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
35
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
35
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
35
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
35
    _memory_used_counter =
714
35
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
35
    _common_profile->add_info_string("IsColocate",
716
35
                                     std::to_string(_parent->is_colocated_operator()));
717
35
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
35
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
35
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
35
    return Status::OK();
721
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.90k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.90k
    _operator_profile =
664
6.90k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.90k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.90k
    _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
6.90k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.90k
    _operator_profile->add_child(_common_profile, true);
673
6.90k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.90k
    _operator_profile->set_metadata(_parent->node_id());
676
6.90k
    _wait_for_finish_dependency_timer =
677
6.90k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.90k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.90k
    if constexpr (!is_fake_shared) {
680
6.90k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.90k
            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
6.90k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.90k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.90k
            _dependency = _shared_state->create_sink_dependency(
697
6.90k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.90k
        }
699
6.90k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.90k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.90k
    }
702
703
6.90k
    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
6.90k
    _rows_input_counter =
708
6.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.90k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.90k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.90k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.90k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.90k
    _memory_used_counter =
714
6.90k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.90k
    _common_profile->add_info_string("IsColocate",
716
6.90k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.90k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.90k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.90k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.90k
    return Status::OK();
721
6.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.9k
    _operator_profile =
664
10.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
10.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.9k
    _operator_profile->add_child(_common_profile, true);
673
10.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.9k
    _operator_profile->set_metadata(_parent->node_id());
676
10.9k
    _wait_for_finish_dependency_timer =
677
10.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.9k
    if constexpr (!is_fake_shared) {
680
10.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.9k
            _dependency = _shared_state->create_sink_dependency(
697
10.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.9k
        }
699
10.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.9k
    }
702
703
10.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
10.9k
    _rows_input_counter =
708
10.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.9k
    _memory_used_counter =
714
10.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.9k
    _common_profile->add_info_string("IsColocate",
716
10.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.9k
    return Status::OK();
721
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
91.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
91.1k
    _operator_profile =
664
91.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
91.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
91.1k
    _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
91.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
91.1k
    _operator_profile->add_child(_common_profile, true);
673
91.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
91.1k
    _operator_profile->set_metadata(_parent->node_id());
676
91.1k
    _wait_for_finish_dependency_timer =
677
91.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
91.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
91.1k
    if constexpr (!is_fake_shared) {
680
91.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
91.1k
            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
91.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
91.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
91.1k
            _dependency = _shared_state->create_sink_dependency(
697
91.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
91.1k
        }
699
91.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
91.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
91.1k
    }
702
703
91.1k
    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
91.1k
    _rows_input_counter =
708
91.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
91.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
91.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
91.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
91.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
91.1k
    _memory_used_counter =
714
91.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
91.1k
    _common_profile->add_info_string("IsColocate",
716
91.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
91.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
91.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
91.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
91.1k
    return Status::OK();
721
91.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
55.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
55.6k
    _operator_profile =
664
55.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
55.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
55.6k
    _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
55.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
55.6k
    _operator_profile->add_child(_common_profile, true);
673
55.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
55.6k
    _operator_profile->set_metadata(_parent->node_id());
676
55.6k
    _wait_for_finish_dependency_timer =
677
55.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
55.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
55.6k
    if constexpr (!is_fake_shared) {
680
55.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
55.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
55.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
55.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
55.6k
                                                  ? 0
688
55.6k
                                                  : info.task_idx]
689
55.6k
                                  .get();
690
55.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
55.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
55.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
55.6k
    }
702
703
55.6k
    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
55.6k
    _rows_input_counter =
708
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
55.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
55.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
55.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
55.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
55.6k
    _memory_used_counter =
714
55.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
55.6k
    _common_profile->add_info_string("IsColocate",
716
55.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
55.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
55.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
55.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
55.6k
    return Status::OK();
721
55.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
46
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
46
    _operator_profile =
664
46
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
46
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
46
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
46
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
46
    _operator_profile->add_child(_common_profile, true);
673
46
    _operator_profile->add_child(_custom_profile, true);
674
675
46
    _operator_profile->set_metadata(_parent->node_id());
676
46
    _wait_for_finish_dependency_timer =
677
46
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
46
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
46
    if constexpr (!is_fake_shared) {
680
46
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
46
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
46
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
46
            _shared_state = info.shared_state->template cast<SharedState>();
696
46
            _dependency = _shared_state->create_sink_dependency(
697
46
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
46
        }
699
46
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
46
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
46
    }
702
703
46
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
46
    _rows_input_counter =
708
46
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
46
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
46
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
46
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
46
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
46
    _memory_used_counter =
714
46
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
46
    _common_profile->add_info_string("IsColocate",
716
46
                                     std::to_string(_parent->is_colocated_operator()));
717
46
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
46
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
46
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
46
    return Status::OK();
721
46
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
569k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
569k
    _operator_profile =
664
569k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
569k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
569k
    _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
569k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
569k
    _operator_profile->add_child(_common_profile, true);
673
569k
    _operator_profile->add_child(_custom_profile, true);
674
675
569k
    _operator_profile->set_metadata(_parent->node_id());
676
569k
    _wait_for_finish_dependency_timer =
677
569k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
569k
    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
569k
    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
569k
    _rows_input_counter =
708
569k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
569k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
569k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
569k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
569k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
569k
    _memory_used_counter =
714
569k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
569k
    _common_profile->add_info_string("IsColocate",
716
569k
                                     std::to_string(_parent->is_colocated_operator()));
717
569k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
569k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
569k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
569k
    return Status::OK();
721
569k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.21k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.21k
    _operator_profile =
664
9.21k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.21k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.21k
    _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.21k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.21k
    _operator_profile->add_child(_common_profile, true);
673
9.21k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.21k
    _operator_profile->set_metadata(_parent->node_id());
676
9.21k
    _wait_for_finish_dependency_timer =
677
9.21k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.21k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.21k
    if constexpr (!is_fake_shared) {
680
9.21k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.21k
            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.21k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.21k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.21k
            _dependency = _shared_state->create_sink_dependency(
697
9.21k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.21k
        }
699
9.21k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.21k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.21k
    }
702
703
9.21k
    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.21k
    _rows_input_counter =
708
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.21k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.21k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.21k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.21k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.21k
    _memory_used_counter =
714
9.21k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.21k
    _common_profile->add_info_string("IsColocate",
716
9.21k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.21k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.21k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.21k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.21k
    return Status::OK();
721
9.21k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
627
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
627
    _operator_profile =
664
627
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
627
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
627
    _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
627
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
627
    _operator_profile->add_child(_common_profile, true);
673
627
    _operator_profile->add_child(_custom_profile, true);
674
675
627
    _operator_profile->set_metadata(_parent->node_id());
676
627
    _wait_for_finish_dependency_timer =
677
627
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
627
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
627
    if constexpr (!is_fake_shared) {
680
627
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
627
            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
627
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
627
            _shared_state = info.shared_state->template cast<SharedState>();
696
627
            _dependency = _shared_state->create_sink_dependency(
697
627
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
627
        }
699
627
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
627
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
627
    }
702
703
627
    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
627
    _rows_input_counter =
708
627
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
627
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
627
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
627
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
627
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
627
    _memory_used_counter =
714
627
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
627
    _common_profile->add_info_string("IsColocate",
716
627
                                     std::to_string(_parent->is_colocated_operator()));
717
627
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
627
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
627
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
627
    return Status::OK();
721
627
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.34k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.34k
    _operator_profile =
664
2.34k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.34k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.34k
    _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.34k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.34k
    _operator_profile->add_child(_common_profile, true);
673
2.34k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.34k
    _operator_profile->set_metadata(_parent->node_id());
676
2.34k
    _wait_for_finish_dependency_timer =
677
2.34k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.34k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.34k
    if constexpr (!is_fake_shared) {
680
2.34k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.34k
            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.34k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.34k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.34k
            _dependency = _shared_state->create_sink_dependency(
697
2.34k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.34k
        }
699
2.34k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.34k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.34k
    }
702
703
2.34k
    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.34k
    _rows_input_counter =
708
2.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.34k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.34k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.34k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.34k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.34k
    _memory_used_counter =
714
2.34k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.34k
    _common_profile->add_info_string("IsColocate",
716
2.34k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.34k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.34k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.34k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.34k
    return Status::OK();
721
2.34k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.6k
    _operator_profile =
664
12.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.6k
    _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.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.6k
    _operator_profile->add_child(_common_profile, true);
673
12.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.6k
    _operator_profile->set_metadata(_parent->node_id());
676
12.6k
    _wait_for_finish_dependency_timer =
677
12.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.6k
    if constexpr (!is_fake_shared) {
680
12.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.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
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.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.6k
            _dependency = _shared_state->create_sink_dependency(
697
12.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.6k
        }
699
12.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.6k
    }
702
703
12.6k
    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.6k
    _rows_input_counter =
708
12.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.6k
    _memory_used_counter =
714
12.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.6k
    _common_profile->add_info_string("IsColocate",
716
12.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.6k
    return Status::OK();
721
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
302k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
302k
    _operator_profile =
664
302k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
302k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
302k
    _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
302k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
302k
    _operator_profile->add_child(_common_profile, true);
673
302k
    _operator_profile->add_child(_custom_profile, true);
674
675
302k
    _operator_profile->set_metadata(_parent->node_id());
676
302k
    _wait_for_finish_dependency_timer =
677
302k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
302k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
302k
    if constexpr (!is_fake_shared) {
680
302k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
302k
            info.shared_state_map.end()) {
682
302k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
302k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
302k
            }
685
302k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
302k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
302k
                                                  ? 0
688
302k
                                                  : info.task_idx]
689
302k
                                  .get();
690
302k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
302k
        } else {
692
38
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
38
                DCHECK(false);
694
38
            }
695
38
            _shared_state = info.shared_state->template cast<SharedState>();
696
38
            _dependency = _shared_state->create_sink_dependency(
697
38
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
38
        }
699
302k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
302k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
302k
    }
702
703
302k
    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
302k
    _rows_input_counter =
708
302k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
302k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
302k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
302k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
302k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
302k
    _memory_used_counter =
714
302k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
302k
    _common_profile->add_info_string("IsColocate",
716
302k
                                     std::to_string(_parent->is_colocated_operator()));
717
302k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
302k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
302k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
302k
    return Status::OK();
721
302k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
471k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
471k
    _operator_profile =
664
471k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
471k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
471k
    _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
471k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
471k
    _operator_profile->add_child(_common_profile, true);
673
471k
    _operator_profile->add_child(_custom_profile, true);
674
675
471k
    _operator_profile->set_metadata(_parent->node_id());
676
471k
    _wait_for_finish_dependency_timer =
677
471k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
471k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
471k
    if constexpr (!is_fake_shared) {
680
471k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
471k
            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
471k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
471k
            _shared_state = info.shared_state->template cast<SharedState>();
696
471k
            _dependency = _shared_state->create_sink_dependency(
697
471k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
471k
        }
699
471k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
471k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
471k
    }
702
703
471k
    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
471k
    _rows_input_counter =
708
471k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
471k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
471k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
471k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
471k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
471k
    _memory_used_counter =
714
471k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
471k
    _common_profile->add_info_string("IsColocate",
716
471k
                                     std::to_string(_parent->is_colocated_operator()));
717
471k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
471k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
471k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
471k
    return Status::OK();
721
471k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.87M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.87M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.87M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.30M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.30M
    }
731
1.87M
    _closed = true;
732
1.87M
    return Status::OK();
733
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
120k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
120k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
120k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
120k
    }
731
120k
    _closed = true;
732
120k
    return Status::OK();
733
120k
}
_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
217k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
217k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
217k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
217k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
217k
    }
731
217k
    _closed = true;
732
217k
    return Status::OK();
733
217k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
26
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
26
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
24
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
24
    }
731
24
    _closed = true;
732
24
    return Status::OK();
733
26
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.88k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.88k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.88k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.88k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.88k
    }
731
6.88k
    _closed = true;
732
6.88k
    return Status::OK();
733
6.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.9k
    }
731
10.9k
    _closed = true;
732
10.9k
    return Status::OK();
733
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
90.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
90.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
90.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
90.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
90.9k
    }
731
90.9k
    _closed = true;
732
90.9k
    return Status::OK();
733
90.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
55.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
55.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
55.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
55.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
55.4k
    }
731
55.4k
    _closed = true;
732
55.4k
    return Status::OK();
733
55.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
35
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
35
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
35
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
35
    }
731
35
    _closed = true;
732
35
    return Status::OK();
733
35
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
572k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
572k
    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
572k
    _closed = true;
732
572k
    return Status::OK();
733
572k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.23k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.23k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.23k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.23k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.23k
    }
731
9.23k
    _closed = true;
732
9.23k
    return Status::OK();
733
9.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
527
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
527
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
527
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
527
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
527
    }
731
527
    _closed = true;
732
527
    return Status::OK();
733
527
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.36k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.36k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.36k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.36k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.36k
    }
731
2.36k
    _closed = true;
732
2.36k
    return Status::OK();
733
2.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.6k
    }
731
12.6k
    _closed = true;
732
12.6k
    return Status::OK();
733
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
304k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
304k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
304k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
304k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
304k
    }
731
304k
    _closed = true;
732
304k
    return Status::OK();
733
304k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
473k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
473k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
473k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
473k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
473k
    }
731
473k
    _closed = true;
732
473k
    return Status::OK();
733
473k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
2.98k
                                                          bool* eos) {
738
2.98k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
2.98k
    return pull(state, block, eos);
740
2.98k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
37
                                                          bool* eos) {
738
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
37
    return pull(state, block, eos);
740
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
2.95k
                                                          bool* eos) {
738
2.95k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
2.94k
    return pull(state, block, eos);
740
2.95k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
685k
                                                         bool* eos) {
745
685k
    auto& local_state = get_local_state(state);
746
685k
    if (need_more_input_data(state)) {
747
655k
        local_state._child_block->clear_column_data(
748
655k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
655k
                        .num_materialized_slots());
750
655k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
655k
                state, local_state._child_block.get(), &local_state._child_eos));
752
655k
        *eos = local_state._child_eos;
753
655k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
85.9k
            return Status::OK();
755
85.9k
        }
756
569k
        {
757
569k
            SCOPED_TIMER(local_state.exec_time_counter());
758
569k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
569k
        }
760
569k
    }
761
762
600k
    if (!need_more_input_data(state)) {
763
569k
        SCOPED_TIMER(local_state.exec_time_counter());
764
569k
        bool new_eos = false;
765
569k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
569k
        if (new_eos) {
767
490k
            *eos = true;
768
490k
        } else if (!need_more_input_data(state)) {
769
23.8k
            *eos = false;
770
23.8k
        }
771
569k
    }
772
600k
    return Status::OK();
773
600k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
145k
                                                         bool* eos) {
745
145k
    auto& local_state = get_local_state(state);
746
145k
    if (need_more_input_data(state)) {
747
126k
        local_state._child_block->clear_column_data(
748
126k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
126k
                        .num_materialized_slots());
750
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
126k
                state, local_state._child_block.get(), &local_state._child_eos));
752
126k
        *eos = local_state._child_eos;
753
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
37.5k
            return Status::OK();
755
37.5k
        }
756
88.5k
        {
757
88.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
88.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
88.5k
        }
760
88.5k
    }
761
762
107k
    if (!need_more_input_data(state)) {
763
107k
        SCOPED_TIMER(local_state.exec_time_counter());
764
107k
        bool new_eos = false;
765
107k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
107k
        if (new_eos) {
767
47.9k
            *eos = true;
768
59.6k
        } else if (!need_more_input_data(state)) {
769
10.9k
            *eos = false;
770
10.9k
        }
771
107k
    }
772
107k
    return Status::OK();
773
107k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.43k
                                                         bool* eos) {
745
4.43k
    auto& local_state = get_local_state(state);
746
4.43k
    if (need_more_input_data(state)) {
747
2.48k
        local_state._child_block->clear_column_data(
748
2.48k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.48k
                        .num_materialized_slots());
750
2.48k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.48k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.48k
        *eos = local_state._child_eos;
753
2.48k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
691
            return Status::OK();
755
691
        }
756
1.79k
        {
757
1.79k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.79k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.79k
        }
760
1.79k
    }
761
762
3.75k
    if (!need_more_input_data(state)) {
763
3.75k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.75k
        bool new_eos = false;
765
3.75k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.75k
        if (new_eos) {
767
1.12k
            *eos = true;
768
2.62k
        } else if (!need_more_input_data(state)) {
769
1.95k
            *eos = false;
770
1.95k
        }
771
3.75k
    }
772
3.74k
    return Status::OK();
773
3.74k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.90k
                                                         bool* eos) {
745
1.90k
    auto& local_state = get_local_state(state);
746
1.90k
    if (need_more_input_data(state)) {
747
1.90k
        local_state._child_block->clear_column_data(
748
1.90k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.90k
                        .num_materialized_slots());
750
1.90k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.90k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.90k
        *eos = local_state._child_eos;
753
1.90k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
778
            return Status::OK();
755
778
        }
756
1.12k
        {
757
1.12k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.12k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.12k
        }
760
1.12k
    }
761
762
1.12k
    if (!need_more_input_data(state)) {
763
1.12k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.12k
        bool new_eos = false;
765
1.12k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.12k
        if (new_eos) {
767
788
            *eos = true;
768
788
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.12k
    }
772
1.12k
    return Status::OK();
773
1.12k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.8k
                                                         bool* eos) {
745
22.8k
    auto& local_state = get_local_state(state);
746
22.8k
    if (need_more_input_data(state)) {
747
22.8k
        local_state._child_block->clear_column_data(
748
22.8k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
22.8k
                        .num_materialized_slots());
750
22.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
22.8k
                state, local_state._child_block.get(), &local_state._child_eos));
752
22.8k
        *eos = local_state._child_eos;
753
22.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
6.73k
            return Status::OK();
755
6.73k
        }
756
16.1k
        {
757
16.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
16.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
16.1k
        }
760
16.1k
    }
761
762
16.1k
    if (!need_more_input_data(state)) {
763
8.42k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.42k
        bool new_eos = false;
765
8.42k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.42k
        if (new_eos) {
767
8.32k
            *eos = true;
768
8.32k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
8.42k
    }
772
16.1k
    return Status::OK();
773
16.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
481k
                                                         bool* eos) {
745
481k
    auto& local_state = get_local_state(state);
746
483k
    if (need_more_input_data(state)) {
747
483k
        local_state._child_block->clear_column_data(
748
483k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
483k
                        .num_materialized_slots());
750
483k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
483k
                state, local_state._child_block.get(), &local_state._child_eos));
752
483k
        *eos = local_state._child_eos;
753
483k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
38.7k
            return Status::OK();
755
38.7k
        }
756
444k
        {
757
444k
            SCOPED_TIMER(local_state.exec_time_counter());
758
444k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
444k
        }
760
444k
    }
761
762
443k
    if (!need_more_input_data(state)) {
763
421k
        SCOPED_TIMER(local_state.exec_time_counter());
764
421k
        bool new_eos = false;
765
421k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
421k
        if (new_eos) {
767
420k
            *eos = true;
768
420k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
421k
    }
772
443k
    return Status::OK();
773
443k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.0k
                                                         bool* eos) {
745
22.0k
    auto& local_state = get_local_state(state);
746
22.0k
    if (need_more_input_data(state)) {
747
11.3k
        local_state._child_block->clear_column_data(
748
11.3k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.3k
                        .num_materialized_slots());
750
11.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.3k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.3k
        *eos = local_state._child_eos;
753
11.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
681
            return Status::OK();
755
681
        }
756
10.6k
        {
757
10.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.6k
        }
760
10.6k
    }
761
762
21.3k
    if (!need_more_input_data(state)) {
763
20.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.7k
        bool new_eos = false;
765
20.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.7k
        if (new_eos) {
767
6.83k
            *eos = true;
768
13.8k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
20.7k
    }
772
21.3k
    return Status::OK();
773
21.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.60k
                                                         bool* eos) {
745
7.60k
    auto& local_state = get_local_state(state);
746
7.60k
    if (need_more_input_data(state)) {
747
7.24k
        local_state._child_block->clear_column_data(
748
7.24k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.24k
                        .num_materialized_slots());
750
7.24k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.24k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.24k
        *eos = local_state._child_eos;
753
7.24k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
810
            return Status::OK();
755
810
        }
756
6.43k
        {
757
6.43k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.43k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.43k
        }
760
6.43k
    }
761
762
6.79k
    if (!need_more_input_data(state)) {
763
6.78k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.78k
        bool new_eos = false;
765
6.78k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.78k
        if (new_eos) {
767
4.65k
            *eos = true;
768
4.65k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.78k
    }
772
6.79k
    return Status::OK();
773
6.79k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
47.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.1k
                                                         "AsyncWriterDependency", true);
781
47.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.1k
                             _finish_dependency));
783
784
47.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.1k
    return Status::OK();
787
47.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
365
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
365
    RETURN_IF_ERROR(Base::init(state, info));
779
365
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
365
                                                         "AsyncWriterDependency", true);
781
365
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
365
                             _finish_dependency));
783
784
365
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
365
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
365
    return Status::OK();
787
365
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
46.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.7k
                                                         "AsyncWriterDependency", true);
781
46.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.7k
                             _finish_dependency));
783
784
46.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.7k
    return Status::OK();
787
46.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
6
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
6
    RETURN_IF_ERROR(Base::init(state, info));
779
6
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
6
                                                         "AsyncWriterDependency", true);
781
6
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
6
                             _finish_dependency));
783
784
6
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
6
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
6
    return Status::OK();
787
6
}
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
47.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.4k
    RETURN_IF_ERROR(Base::open(state));
793
47.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
362k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
315k
        RETURN_IF_ERROR(
796
315k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
315k
    }
798
47.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.4k
    return Status::OK();
800
47.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
364
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
364
    RETURN_IF_ERROR(Base::open(state));
793
364
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.87k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.51k
        RETURN_IF_ERROR(
796
1.51k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.51k
    }
798
364
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
364
    return Status::OK();
800
364
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
47.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.1k
    RETURN_IF_ERROR(Base::open(state));
793
47.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
360k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
313k
        RETURN_IF_ERROR(
796
313k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
313k
    }
798
47.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.1k
    return Status::OK();
800
47.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
6
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
6
    RETURN_IF_ERROR(Base::open(state));
793
6
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
108
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
102
        RETURN_IF_ERROR(
796
102
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
102
    }
798
6
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
6
    return Status::OK();
800
6
}
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
63.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.2k
    return _writer->sink(block, eos);
806
63.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.65k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.65k
    return _writer->sink(block, eos);
806
1.65k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
61.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.5k
    return _writer->sink(block, eos);
806
61.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
6
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
6
    return _writer->sink(block, eos);
806
6
}
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
47.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.5k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
47.6k
    if (_writer) {
818
47.6k
        Status st = _writer->get_writer_status();
819
47.6k
        if (exec_status.ok()) {
820
47.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.5k
                                                       : Status::Cancelled("force close"));
822
47.5k
        } else {
823
79
            _writer->force_close(exec_status);
824
79
        }
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
47.6k
        RETURN_IF_ERROR(st);
829
47.6k
    }
830
47.5k
    return Base::close(state, exec_status);
831
47.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
354
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
354
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
354
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
354
    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
354
    if (_writer) {
818
354
        Status st = _writer->get_writer_status();
819
354
        if (exec_status.ok()) {
820
354
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
354
                                                       : Status::Cancelled("force close"));
822
354
        } 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
354
        RETURN_IF_ERROR(st);
829
354
    }
830
354
    return Base::close(state, exec_status);
831
354
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
47.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.1k
    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
47.2k
    if (_writer) {
818
47.2k
        Status st = _writer->get_writer_status();
819
47.2k
        if (exec_status.ok()) {
820
47.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.1k
                                                       : Status::Cancelled("force close"));
822
47.1k
        } else {
823
79
            _writer->force_close(exec_status);
824
79
        }
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
47.2k
        RETURN_IF_ERROR(st);
829
47.2k
    }
830
47.1k
    return Base::close(state, exec_status);
831
47.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
6
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
6
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
6
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
6
    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
6
    if (_writer) {
818
6
        Status st = _writer->get_writer_status();
819
6
        if (exec_status.ok()) {
820
6
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
6
                                                       : Status::Cancelled("force close"));
822
6
        } 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
6
        RETURN_IF_ERROR(st);
829
6
    }
830
6
    return Base::close(state, exec_status);
831
6
}
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