Coverage Report

Created: 2026-11-02 19:06

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
2.14M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
2.14M
    if (_parent->nereids_id() == -1) {
123
1.12M
        return fmt::format("(id={})", _parent->node_id());
124
1.12M
    } else {
125
1.02M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.02M
    }
127
2.14M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.9k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
70.9k
    } else {
125
70.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.9k
    }
127
70.9k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
258k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
258k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
258k
    } else {
125
258k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
258k
    }
127
258k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
154
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
154
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
154
    } else {
125
154
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
154
    }
127
154
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.84k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.84k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.84k
    } else {
125
5.84k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.84k
    }
127
5.84k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
8.90k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
8.90k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
8.84k
    } else {
125
8.84k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.84k
    }
127
8.90k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
109k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
109k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
109k
    } else {
125
109k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
109k
    }
127
109k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
80.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
80.9k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
80.9k
    } else {
125
80.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
80.9k
    }
127
80.9k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
118
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
118
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
118
    } else {
125
118
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
118
    }
127
118
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
769k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
769k
    if (_parent->nereids_id() == -1) {
123
343k
        return fmt::format("(id={})", _parent->node_id());
124
426k
    } else {
125
426k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
426k
    }
127
769k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
57.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
57.1k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
57.1k
    } else {
125
57.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
57.1k
    }
127
57.1k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
7.01k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
7.01k
    if (_parent->nereids_id() == -1) {
123
7.01k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
7.01k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
693
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
693
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
591
    } else {
125
591
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
591
    }
127
693
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.05k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.05k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.04k
    } else {
125
5.04k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.04k
    }
127
5.05k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
772k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
773k
    if (_parent->nereids_id() == -1) {
123
773k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
772k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.38M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.38M
    if (_parent->nereids_id() == -1) {
132
789k
        return fmt::format("(id={})", _parent->node_id());
133
789k
    } else {
134
598k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
598k
    }
136
1.38M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
119k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
119k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
119k
    } else {
134
119k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
119k
    }
136
119k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
262k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
262k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
262k
    } else {
134
262k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
262k
    }
136
262k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
161
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
161
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
161
    } else {
134
161
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
161
    }
136
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.86k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.86k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.86k
    } else {
134
5.86k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.86k
    }
136
5.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.94k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.94k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
8.88k
    } else {
134
8.88k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.88k
    }
136
8.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
109k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
109k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
109k
    } else {
134
109k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
109k
    }
136
109k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
80.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
80.8k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
80.8k
    } else {
134
80.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
80.8k
    }
136
80.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
128
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
128
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
128
    } else {
134
128
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
128
    }
136
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
43
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
43
    if (_parent->nereids_id() == -1) {
132
43
        return fmt::format("(id={})", _parent->node_id());
133
43
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
43
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
11.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
11.5k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
11.5k
    } else {
134
11.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
11.5k
    }
136
11.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
696
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
696
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
594
    } else {
134
594
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
594
    }
136
696
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.5k
    if (_parent->nereids_id() == -1) {
132
12.5k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
284k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
284k
    if (_parent->nereids_id() == -1) {
132
284k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
284k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
490k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
492k
    if (_parent->nereids_id() == -1) {
132
492k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
490k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
30.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
30.8k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
30.8k
    _terminated = true;
144
30.8k
    return Status::OK();
145
30.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.59k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.59k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.59k
    _terminated = true;
144
2.59k
    return Status::OK();
145
2.59k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.59k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.59k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.59k
    _terminated = true;
144
1.59k
    return Status::OK();
145
1.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
977
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
977
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
977
    _terminated = true;
144
977
    return Status::OK();
145
977
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
703
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
703
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
703
    _terminated = true;
144
703
    return Status::OK();
145
703
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
309
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
309
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
309
    _terminated = true;
144
309
    return Status::OK();
145
309
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
87
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
87
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
87
    _terminated = true;
144
87
    return Status::OK();
145
87
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
369
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
369
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
369
    _terminated = true;
144
369
    return Status::OK();
145
369
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
127
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
127
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
127
    _terminated = true;
144
127
    return Status::OK();
145
127
}
146
147
333k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
333k
    return _child && _child->is_serial_operator() && !is_source()
149
333k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
333k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
333k
}
152
153
32.0k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
32.0k
    if (!_child) {
155
31.2k
        return false;
156
31.2k
    }
157
850
    if (_child->is_serial_operator()) {
158
32
        return true;
159
32
    }
160
818
    const auto child_distribution = _child->required_data_distribution(state);
161
818
    return child_distribution.need_local_exchange() &&
162
818
           !is_shuffled_exchange(child_distribution.distribution_type);
163
850
}
164
165
template <typename SharedStateArg>
166
15.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.2k
    fmt::memory_buffer debug_string_buffer;
168
15.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.2k
    return fmt::to_string(debug_string_buffer);
170
15.2k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
6
    fmt::memory_buffer debug_string_buffer;
168
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
6
    return fmt::to_string(debug_string_buffer);
170
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
6
    fmt::memory_buffer debug_string_buffer;
168
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
6
    return fmt::to_string(debug_string_buffer);
170
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.2k
    fmt::memory_buffer debug_string_buffer;
168
15.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.2k
    return fmt::to_string(debug_string_buffer);
170
15.2k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
12
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
12
    fmt::memory_buffer debug_string_buffer;
168
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
12
    return fmt::to_string(debug_string_buffer);
170
12
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
15.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.2k
    fmt::memory_buffer debug_string_buffer;
175
15.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.2k
    return fmt::to_string(debug_string_buffer);
177
15.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
6
    fmt::memory_buffer debug_string_buffer;
175
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
6
    return fmt::to_string(debug_string_buffer);
177
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
6
    fmt::memory_buffer debug_string_buffer;
175
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
6
    return fmt::to_string(debug_string_buffer);
177
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
12
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
12
    fmt::memory_buffer debug_string_buffer;
175
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
12
    return fmt::to_string(debug_string_buffer);
177
12
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
7
    fmt::memory_buffer debug_string_buffer;
175
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
7
    return fmt::to_string(debug_string_buffer);
177
7
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.2k
    fmt::memory_buffer debug_string_buffer;
175
15.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.2k
    return fmt::to_string(debug_string_buffer);
177
15.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.2k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.2k
    fmt::memory_buffer debug_string_buffer;
181
15.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.2k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.2k
                   _is_serial_operator);
184
15.2k
    return fmt::to_string(debug_string_buffer);
185
15.2k
}
186
187
15.2k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.2k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.2k
}
190
191
722k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
722k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
722k
    _nereids_id = tnode.nereids_id;
194
722k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.81k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.81k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.81k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.81k
    }
207
722k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
722k
    _op_name = substr + "_OPERATOR";
209
210
722k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
722k
    } else if (tnode.__isset.conjuncts) {
213
286k
        for (const auto& conjunct : tnode.conjuncts) {
214
286k
            VExprContextSPtr context;
215
286k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
286k
            _conjuncts.emplace_back(context);
217
286k
        }
218
106k
    }
219
220
    // create the projections expr
221
722k
    if (tnode.__isset.projections) {
222
277k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
277k
    }
224
722k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.81k
        DCHECK(has_projection()) << "no final projections";
226
6.81k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.81k
    }
233
722k
    return Status::OK();
234
722k
}
235
236
748k
Status OperatorXBase::prepare(RuntimeState* state) {
237
748k
    for (auto& conjunct : _conjuncts) {
238
286k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
286k
    }
240
748k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
698k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
349k
            return a->execute_cost() < b->execute_cost();
243
349k
        });
244
698k
    };
245
246
748k
    if (has_projection()) {
247
277k
        auto& projection = *_projection;
248
289k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
277k
        const auto& final_projection_input_row_desc =
256
277k
                projection.intermediate_output_row_descriptors.empty()
257
277k
                        ? operator_row_desc_before_projection()
258
277k
                        : projection.intermediate_output_row_descriptors.back();
259
277k
        RETURN_IF_ERROR(
260
277k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
277k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
277k
                                                      projection.output_row_descriptor));
263
277k
    }
264
265
748k
    for (auto& conjunct : _conjuncts) {
266
286k
        RETURN_IF_ERROR(conjunct->open(state));
267
286k
    }
268
748k
    if (has_projection()) {
269
277k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
277k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
277k
    }
274
748k
    if (_child && !is_source()) {
275
105k
        RETURN_IF_ERROR(_child->prepare(state));
276
105k
    }
277
278
748k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
748k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
748k
    return Status::OK();
284
748k
}
285
286
7.43k
Status OperatorXBase::terminate(RuntimeState* state) {
287
7.43k
    if (_child && !is_source()) {
288
611
        RETURN_IF_ERROR(_child->terminate(state));
289
611
    }
290
7.43k
    auto result = state->get_local_state_result(operator_id());
291
7.43k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
7.43k
    return result.value()->terminate(state);
295
7.43k
}
296
297
5.82M
Status OperatorXBase::close(RuntimeState* state) {
298
5.82M
    if (_child && !is_source()) {
299
993k
        RETURN_IF_ERROR(_child->close(state));
300
993k
    }
301
5.82M
    auto result = state->get_local_state_result(operator_id());
302
5.82M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.82M
    return result.value()->close(state);
306
5.82M
}
307
308
299k
void PipelineXLocalStateBase::clear_origin_block() {
309
299k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
299k
}
311
312
970k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
970k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
970k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
970k
    return Status::OK();
317
970k
}
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
299k
                                     Block* output_block) const {
326
299k
    auto* local_state = state->get_local_state(operator_id());
327
299k
    SCOPED_TIMER(local_state->exec_time_counter());
328
299k
    SCOPED_TIMER(local_state->_projection_timer);
329
299k
    const size_t rows = origin_block->rows();
330
299k
    if (rows == 0) {
331
153k
        return Status::OK();
332
153k
    }
333
145k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
145k
    {
336
145k
        Block input_block = *origin_block;
337
338
145k
        ColumnsWithTypeAndName new_columns;
339
145k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.53k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.53k
            new_columns.resize(projections.size());
345
125k
            for (int i = 0; i < projections.size(); i++) {
346
120k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
120k
                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
120k
            }
355
5.52k
            Block tmp_block {new_columns};
356
5.52k
            input_block.swap(tmp_block);
357
5.52k
        }
358
359
145k
        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
145k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
145k
                output_block, _projection->output_row_descriptor);
368
145k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
145k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
145k
        Columns shared_columns(mutable_columns.size());
371
372
826k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
680k
            ColumnPtr column_ptr;
374
680k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
680k
            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
680k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
680k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
680k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
439k
            } else {
388
439k
                shared_columns[i] = std::move(column_ptr);
389
439k
            }
390
680k
        }
391
392
145k
        scoped_mutable_block.restore();
393
826k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
680k
            if (shared_columns[i]) {
395
440k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
440k
            }
397
680k
        }
398
145k
    }
399
400
0
    origin_block->clear_column_data(
401
145k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
145k
    DCHECK_EQ(output_block->rows(), rows);
403
404
145k
    return Status::OK();
405
145k
}
406
407
4.70M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.70M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.70M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.70M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.70M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.70M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.70M
            if (_debug_point_count++ % 2 == 0) {
414
4.70M
                return Status::OK();
415
4.70M
            }
416
4.70M
        }
417
4.70M
    });
418
419
4.70M
    Status status;
420
4.70M
    auto* local_state = state->get_local_state(operator_id());
421
4.70M
    Defer defer([&]() {
422
4.70M
        if (status.ok()) {
423
4.70M
            local_state->update_output_block_counters(*block);
424
4.70M
        }
425
4.70M
    });
426
4.70M
    if (has_projection()) {
427
299k
        local_state->clear_origin_block();
428
299k
        status = get_block(state, &local_state->_origin_block, eos);
429
299k
        if (UNLIKELY(!status.ok())) {
430
42
            return status;
431
42
        }
432
298k
        status = do_projections(state, &local_state->_origin_block, block);
433
298k
        return status;
434
299k
    }
435
4.40M
    status = get_block(state, block, eos);
436
4.40M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.40M
    return status;
438
4.40M
}
439
440
3.12M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
3.12M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.1k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.1k
        *eos = true;
444
10.1k
    }
445
446
3.12M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
3.12M
        auto op_name = to_lower(_parent->_op_name);
448
3.12M
        auto arg_op_name = dp->param<std::string>("op_name");
449
3.12M
        arg_op_name = to_lower(arg_op_name);
450
451
3.12M
        if (op_name == arg_op_name) {
452
3.12M
            *eos = true;
453
3.12M
        }
454
3.12M
    });
455
456
3.12M
    if (auto rows = block->rows()) {
457
812k
        _num_rows_returned += rows;
458
812k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
812k
    }
460
3.12M
}
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
15.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.2k
    fmt::memory_buffer debug_string_buffer;
472
473
15.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.2k
    return fmt::to_string(debug_string_buffer);
476
15.2k
}
477
478
15.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.2k
}
481
482
371k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
371k
    std::string op_name = "UNKNOWN_SINK";
484
371k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
371k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
371k
        op_name = it->second;
488
371k
    }
489
371k
    _name = op_name + "_OPERATOR";
490
371k
    return Status::OK();
491
371k
}
492
493
318k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
318k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
318k
    _nereids_id = tnode.nereids_id;
496
318k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
318k
    _name = substr + "_SINK_OPERATOR";
498
318k
    return Status::OK();
499
318k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
2.01M
                                                            LocalSinkStateInfo& info) {
504
2.01M
    auto local_state = LocalStateType::create_unique(this, state);
505
2.01M
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.01M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.01M
    return Status::OK();
508
2.01M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
119k
                                                            LocalSinkStateInfo& info) {
504
119k
    auto local_state = LocalStateType::create_unique(this, state);
505
119k
    RETURN_IF_ERROR(local_state->init(state, info));
506
119k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
119k
    return Status::OK();
508
119k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
442k
                                                            LocalSinkStateInfo& info) {
504
442k
    auto local_state = LocalStateType::create_unique(this, state);
505
442k
    RETURN_IF_ERROR(local_state->init(state, info));
506
442k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
442k
    return Status::OK();
508
442k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_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
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
370
                                                            LocalSinkStateInfo& info) {
504
370
    auto local_state = LocalStateType::create_unique(this, state);
505
370
    RETURN_IF_ERROR(local_state->init(state, info));
506
370
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
370
    return Status::OK();
508
370
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
51.0k
                                                            LocalSinkStateInfo& info) {
504
51.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
51.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
51.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
51.0k
    return Status::OK();
508
51.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
18
                                                            LocalSinkStateInfo& info) {
504
18
    auto local_state = LocalStateType::create_unique(this, state);
505
18
    RETURN_IF_ERROR(local_state->init(state, info));
506
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
18
    return Status::OK();
508
18
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.85k
                                                            LocalSinkStateInfo& info) {
504
8.85k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.85k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.85k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.85k
    return Status::OK();
508
8.85k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
21
                                                            LocalSinkStateInfo& info) {
504
21
    auto local_state = LocalStateType::create_unique(this, state);
505
21
    RETURN_IF_ERROR(local_state->init(state, info));
506
21
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
21
    return Status::OK();
508
21
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
263k
                                                            LocalSinkStateInfo& info) {
504
263k
    auto local_state = LocalStateType::create_unique(this, state);
505
263k
    RETURN_IF_ERROR(local_state->init(state, info));
506
263k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
263k
    return Status::OK();
508
263k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
161
                                                            LocalSinkStateInfo& info) {
504
161
    auto local_state = LocalStateType::create_unique(this, state);
505
161
    RETURN_IF_ERROR(local_state->init(state, info));
506
161
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
161
    return Status::OK();
508
161
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
284k
                                                            LocalSinkStateInfo& info) {
504
284k
    auto local_state = LocalStateType::create_unique(this, state);
505
284k
    RETURN_IF_ERROR(local_state->init(state, info));
506
284k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
284k
    return Status::OK();
508
284k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
109k
                                                            LocalSinkStateInfo& info) {
504
109k
    auto local_state = LocalStateType::create_unique(this, state);
505
109k
    RETURN_IF_ERROR(local_state->init(state, info));
506
109k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
109k
    return Status::OK();
508
109k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
80.7k
                                                            LocalSinkStateInfo& info) {
504
80.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
80.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
80.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
80.7k
    return Status::OK();
508
80.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
128
                                                            LocalSinkStateInfo& info) {
504
128
    auto local_state = LocalStateType::create_unique(this, state);
505
128
    RETURN_IF_ERROR(local_state->init(state, info));
506
128
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
128
    return Status::OK();
508
128
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
619k
                                                            LocalSinkStateInfo& info) {
504
619k
    auto local_state = LocalStateType::create_unique(this, state);
505
619k
    RETURN_IF_ERROR(local_state->init(state, info));
506
619k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
619k
    return Status::OK();
508
619k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.87k
                                                            LocalSinkStateInfo& info) {
504
5.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.87k
    return Status::OK();
508
5.87k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
11.5k
                                                            LocalSinkStateInfo& info) {
504
11.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.5k
    return Status::OK();
508
11.5k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.79k
                                                            LocalSinkStateInfo& info) {
504
2.79k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.79k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.79k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.79k
    return Status::OK();
508
2.79k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
592
                                                            LocalSinkStateInfo& info) {
504
592
    auto local_state = LocalStateType::create_unique(this, state);
505
592
    RETURN_IF_ERROR(local_state->init(state, info));
506
592
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
592
    return Status::OK();
508
592
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.79k
                                                            LocalSinkStateInfo& info) {
504
4.79k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.79k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.79k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.79k
    return Status::OK();
508
4.79k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.56k
                                                            LocalSinkStateInfo& info) {
504
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.56k
    return Status::OK();
508
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.60k
                                                            LocalSinkStateInfo& info) {
504
2.60k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.60k
    return Status::OK();
508
2.60k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.50k
                                                            LocalSinkStateInfo& info) {
504
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.50k
    return Status::OK();
508
2.50k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
558
                                                            LocalSinkStateInfo& info) {
504
558
    auto local_state = LocalStateType::create_unique(this, state);
505
558
    RETURN_IF_ERROR(local_state->init(state, info));
506
558
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
558
    return Status::OK();
508
558
}
_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.61M
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.61M
    } else {
519
1.61M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.61M
        ss->id = operator_id();
521
1.61M
        for (auto& dest : dests_id()) {
522
1.61M
            ss->related_op_ids.insert(dest);
523
1.61M
        }
524
1.61M
        return ss;
525
1.61M
    }
526
1.61M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
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
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
103k
            ss->related_op_ids.insert(dest);
523
103k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
443k
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
443k
    } else {
519
443k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
443k
        ss->id = operator_id();
521
443k
        for (auto& dest : dests_id()) {
522
442k
            ss->related_op_ids.insert(dest);
523
442k
        }
524
443k
        return ss;
525
443k
    }
526
443k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_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
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
367
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
367
    } else {
519
367
        auto ss = LocalStateType::SharedStateType::create_shared();
520
367
        ss->id = operator_id();
521
369
        for (auto& dest : dests_id()) {
522
369
            ss->related_op_ids.insert(dest);
523
369
        }
524
367
        return ss;
525
367
    }
526
367
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
51.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
51.2k
    } else {
519
51.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
51.2k
        ss->id = operator_id();
521
51.2k
        for (auto& dest : dests_id()) {
522
50.9k
            ss->related_op_ids.insert(dest);
523
50.9k
        }
524
51.2k
        return ss;
525
51.2k
    }
526
51.2k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
18
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
18
    } else {
519
18
        auto ss = LocalStateType::SharedStateType::create_shared();
520
18
        ss->id = operator_id();
521
18
        for (auto& dest : dests_id()) {
522
18
            ss->related_op_ids.insert(dest);
523
18
        }
524
18
        return ss;
525
18
    }
526
18
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8.95k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8.95k
    } else {
519
8.95k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.95k
        ss->id = operator_id();
521
8.95k
        for (auto& dest : dests_id()) {
522
8.94k
            ss->related_op_ids.insert(dest);
523
8.94k
        }
524
8.95k
        return ss;
525
8.95k
    }
526
8.95k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
21
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
21
    } else {
519
21
        auto ss = LocalStateType::SharedStateType::create_shared();
520
21
        ss->id = operator_id();
521
21
        for (auto& dest : dests_id()) {
522
21
            ss->related_op_ids.insert(dest);
523
21
        }
524
21
        return ss;
525
21
    }
526
21
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
264k
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
264k
    } else {
519
264k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
264k
        ss->id = operator_id();
521
265k
        for (auto& dest : dests_id()) {
522
265k
            ss->related_op_ids.insert(dest);
523
265k
        }
524
264k
        return ss;
525
264k
    }
526
264k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
163
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
163
    } else {
519
163
        auto ss = LocalStateType::SharedStateType::create_shared();
520
163
        ss->id = operator_id();
521
163
        for (auto& dest : dests_id()) {
522
163
            ss->related_op_ids.insert(dest);
523
163
        }
524
163
        return ss;
525
163
    }
526
163
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
110k
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
110k
    } else {
519
110k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
110k
        ss->id = operator_id();
521
110k
        for (auto& dest : dests_id()) {
522
110k
            ss->related_op_ids.insert(dest);
523
110k
        }
524
110k
        return ss;
525
110k
    }
526
110k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
127
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
127
    } else {
519
127
        auto ss = LocalStateType::SharedStateType::create_shared();
520
127
        ss->id = operator_id();
521
127
        for (auto& dest : dests_id()) {
522
127
            ss->related_op_ids.insert(dest);
523
127
        }
524
127
        return ss;
525
127
    }
526
127
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
623k
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
623k
    } else {
519
623k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
623k
        ss->id = operator_id();
521
623k
        for (auto& dest : dests_id()) {
522
617k
            ss->related_op_ids.insert(dest);
523
617k
        }
524
623k
        return ss;
525
623k
    }
526
623k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.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
5.89k
    } else {
519
5.89k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.89k
        ss->id = operator_id();
521
5.90k
        for (auto& dest : dests_id()) {
522
5.90k
            ss->related_op_ids.insert(dest);
523
5.90k
        }
524
5.89k
        return ss;
525
5.89k
    }
526
5.89k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
700
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
700
    } else {
519
700
        auto ss = LocalStateType::SharedStateType::create_shared();
520
700
        ss->id = operator_id();
521
700
        for (auto& dest : dests_id()) {
522
699
            ss->related_op_ids.insert(dest);
523
699
        }
524
700
        return ss;
525
700
    }
526
700
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.61k
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.61k
    } else {
519
2.61k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.61k
        ss->id = operator_id();
521
2.62k
        for (auto& dest : dests_id()) {
522
2.62k
            ss->related_op_ids.insert(dest);
523
2.62k
        }
524
2.61k
        return ss;
525
2.61k
    }
526
2.61k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.52k
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.52k
    } else {
519
2.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.52k
        ss->id = operator_id();
521
2.52k
        for (auto& dest : dests_id()) {
522
2.51k
            ss->related_op_ids.insert(dest);
523
2.51k
        }
524
2.52k
        return ss;
525
2.52k
    }
526
2.52k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_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_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
560
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
560
    } else {
519
560
        auto ss = LocalStateType::SharedStateType::create_shared();
520
560
        ss->id = operator_id();
521
560
        for (auto& dest : dests_id()) {
522
552
            ss->related_op_ids.insert(dest);
523
552
        }
524
560
        return ss;
525
560
    }
526
560
}
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.43M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.43M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.43M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.43M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.43M
    return Status::OK();
534
2.43M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.2k
    return Status::OK();
534
71.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
262k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
262k
    auto local_state = LocalStateType::create_unique(state, this);
531
262k
    RETURN_IF_ERROR(local_state->init(state, info));
532
262k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
262k
    return Status::OK();
534
262k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
122
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
122
    auto local_state = LocalStateType::create_unique(state, this);
531
122
    RETURN_IF_ERROR(local_state->init(state, info));
532
122
    state->emplace_local_state(operator_id(), std::move(local_state));
533
122
    return Status::OK();
534
122
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.38k
    return Status::OK();
534
3.38k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.86k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.86k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.86k
    return Status::OK();
534
8.86k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.14k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.14k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.14k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.14k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.14k
    return Status::OK();
534
8.14k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
154
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
154
    auto local_state = LocalStateType::create_unique(state, this);
531
154
    RETURN_IF_ERROR(local_state->init(state, info));
532
154
    state->emplace_local_state(operator_id(), std::move(local_state));
533
154
    return Status::OK();
534
154
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
254k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
254k
    auto local_state = LocalStateType::create_unique(state, this);
531
254k
    RETURN_IF_ERROR(local_state->init(state, info));
532
254k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
254k
    return Status::OK();
534
254k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
109k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
109k
    auto local_state = LocalStateType::create_unique(state, this);
531
109k
    RETURN_IF_ERROR(local_state->init(state, info));
532
109k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
109k
    return Status::OK();
534
109k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
81.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
81.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
81.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
81.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
81.0k
    return Status::OK();
534
81.0k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
118
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
118
    auto local_state = LocalStateType::create_unique(state, this);
531
118
    RETURN_IF_ERROR(local_state->init(state, info));
532
118
    state->emplace_local_state(operator_id(), std::move(local_state));
533
118
    return Status::OK();
534
118
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.65k
    return Status::OK();
534
4.65k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
348k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
348k
    auto local_state = LocalStateType::create_unique(state, this);
531
348k
    RETURN_IF_ERROR(local_state->init(state, info));
532
348k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
348k
    return Status::OK();
534
348k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.57k
    return Status::OK();
534
1.57k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.88k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.88k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.88k
    return Status::OK();
534
5.88k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
57.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
57.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
57.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
57.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
57.1k
    return Status::OK();
534
57.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.02k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.02k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.02k
    return Status::OK();
534
7.02k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
581
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
581
    auto local_state = LocalStateType::create_unique(state, this);
531
581
    RETURN_IF_ERROR(local_state->init(state, info));
532
581
    state->emplace_local_state(operator_id(), std::move(local_state));
533
581
    return Status::OK();
534
581
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.59k
    return Status::OK();
534
2.59k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.48k
    return Status::OK();
534
2.48k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.9k
    return Status::OK();
534
10.9k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
779k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
779k
    auto local_state = LocalStateType::create_unique(state, this);
531
779k
    RETURN_IF_ERROR(local_state->init(state, info));
532
779k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
779k
    return Status::OK();
534
779k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_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
800
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
800
    auto local_state = LocalStateType::create_unique(state, this);
531
800
    RETURN_IF_ERROR(local_state->init(state, info));
532
800
    state->emplace_local_state(operator_id(), std::move(local_state));
533
800
    return Status::OK();
534
800
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
826
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
826
    auto local_state = LocalStateType::create_unique(state, this);
531
826
    RETURN_IF_ERROR(local_state->init(state, info));
532
826
    state->emplace_local_state(operator_id(), std::move(local_state));
533
826
    return Status::OK();
534
826
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.3k
    return Status::OK();
534
10.3k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
396k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
396k
    auto local_state = LocalStateType::create_unique(state, this);
531
396k
    RETURN_IF_ERROR(local_state->init(state, info));
532
396k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
396k
    return Status::OK();
534
396k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
2.00M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.42M
        : _num_rows_returned(0),
542
2.42M
          _rows_returned_counter(nullptr),
543
2.42M
          _parent(parent),
544
2.42M
          _state(state),
545
2.42M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.44M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.44M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.44M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.44M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.44M
    _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.44M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.44M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.44M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.44M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.44M
    if constexpr (!is_fake_shared) {
560
1.39M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
868k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
868k
                                    .first.get()
563
868k
                                    ->template cast<SharedStateArg>();
564
565
868k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
868k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
868k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
868k
        } else if (info.shared_state) {
569
449k
            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
449k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
449k
            _dependency = _shared_state->create_source_dependency(
576
449k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
449k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
449k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
449k
        } else {
580
80.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
13.5k
                DCHECK(false);
582
13.5k
            }
583
80.6k
        }
584
1.39M
    }
585
586
2.44M
    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.44M
    _rows_returned_counter =
591
2.44M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.44M
    _blocks_returned_counter =
593
2.44M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.44M
    _output_block_bytes_counter =
595
2.44M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.44M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.44M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.44M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.44M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.44M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.44M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.44M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.44M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.44M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.44M
    _memory_used_counter =
606
2.44M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.44M
    _common_profile->add_info_string("IsColocate",
608
2.44M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.44M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.44M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.44M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.44M
    return Status::OK();
613
2.44M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.4k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
71.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.4k
    if constexpr (!is_fake_shared) {
560
71.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
15.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
15.3k
                                    .first.get()
563
15.3k
                                    ->template cast<SharedStateArg>();
564
565
15.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
15.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
15.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.0k
        } 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
55.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.3k
            _dependency = _shared_state->create_source_dependency(
576
55.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
728
        }
584
71.4k
    }
585
586
71.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
71.4k
    _rows_returned_counter =
591
71.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.4k
    _blocks_returned_counter =
593
71.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.4k
    _output_block_bytes_counter =
595
71.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.4k
    _memory_used_counter =
606
71.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.4k
    _common_profile->add_info_string("IsColocate",
608
71.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.4k
    return Status::OK();
613
71.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _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
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        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
4
        } 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
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    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
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
264k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
264k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
264k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
264k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
264k
    _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
264k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
264k
    _operator_profile->add_child(_common_profile.get(), true);
557
264k
    _operator_profile->add_child(_custom_profile.get(), true);
558
264k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
264k
    if constexpr (!is_fake_shared) {
560
264k
        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
264k
        } 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
252k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
252k
            _dependency = _shared_state->create_source_dependency(
576
252k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
252k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
252k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
252k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
12.0k
        }
584
264k
    }
585
586
264k
    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
264k
    _rows_returned_counter =
591
264k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
264k
    _blocks_returned_counter =
593
264k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
264k
    _output_block_bytes_counter =
595
264k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
264k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
264k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
264k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
264k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
264k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
264k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
264k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
264k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
264k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
264k
    _memory_used_counter =
606
264k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
264k
    _common_profile->add_info_string("IsColocate",
608
264k
                                     std::to_string(_parent->is_colocated_operator()));
609
264k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
264k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
264k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
264k
    return Status::OK();
613
264k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
154
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
154
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
154
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
154
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
154
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
154
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
154
    _operator_profile->add_child(_common_profile.get(), true);
557
154
    _operator_profile->add_child(_custom_profile.get(), true);
558
154
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
154
    if constexpr (!is_fake_shared) {
560
154
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
154
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
154
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
154
            _dependency = _shared_state->create_source_dependency(
576
154
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
154
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
154
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
154
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
154
    }
585
586
154
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
154
    _rows_returned_counter =
591
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
154
    _blocks_returned_counter =
593
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
154
    _output_block_bytes_counter =
595
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
154
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
154
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
154
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
154
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
154
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
154
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
154
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
154
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
154
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
154
    _memory_used_counter =
606
154
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
154
    _common_profile->add_info_string("IsColocate",
608
154
                                     std::to_string(_parent->is_colocated_operator()));
609
154
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
154
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
154
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
154
    return Status::OK();
613
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.89k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.89k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.89k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.89k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.89k
    _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.89k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.89k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.89k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.89k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.89k
    if constexpr (!is_fake_shared) {
560
5.89k
        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.89k
        } 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.84k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.84k
            _dependency = _shared_state->create_source_dependency(
576
5.84k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.84k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.84k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.84k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50
        }
584
5.89k
    }
585
586
5.89k
    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.89k
    _rows_returned_counter =
591
5.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.89k
    _blocks_returned_counter =
593
5.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.89k
    _output_block_bytes_counter =
595
5.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.89k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.89k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.89k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.89k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.89k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.89k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.89k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.89k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.89k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.89k
    _memory_used_counter =
606
5.89k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.89k
    _common_profile->add_info_string("IsColocate",
608
5.89k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.89k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.89k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.89k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.89k
    return Status::OK();
613
5.89k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.95k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.95k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.95k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.95k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.95k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
8.95k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.95k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.95k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.95k
    if constexpr (!is_fake_shared) {
560
8.95k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
8.95k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
8.85k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.85k
            _dependency = _shared_state->create_source_dependency(
576
8.85k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.85k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
91
        }
584
8.95k
    }
585
586
8.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
8.95k
    _rows_returned_counter =
591
8.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.95k
    _blocks_returned_counter =
593
8.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.95k
    _output_block_bytes_counter =
595
8.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.95k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.95k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.95k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.95k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.95k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.95k
    _memory_used_counter =
606
8.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.95k
    _common_profile->add_info_string("IsColocate",
608
8.95k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.95k
    return Status::OK();
613
8.95k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
110k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
110k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
110k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
110k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
110k
    _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
110k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
110k
    _operator_profile->add_child(_common_profile.get(), true);
557
110k
    _operator_profile->add_child(_custom_profile.get(), true);
558
110k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
110k
    if constexpr (!is_fake_shared) {
560
110k
        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
110k
        } 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
108k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
108k
            _dependency = _shared_state->create_source_dependency(
576
108k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
108k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
108k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
108k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.87k
        }
584
110k
    }
585
586
110k
    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
110k
    _rows_returned_counter =
591
110k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
110k
    _blocks_returned_counter =
593
110k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
110k
    _output_block_bytes_counter =
595
110k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
110k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
110k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
110k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
110k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
110k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
110k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
110k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
110k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
110k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
110k
    _memory_used_counter =
606
110k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
110k
    _common_profile->add_info_string("IsColocate",
608
110k
                                     std::to_string(_parent->is_colocated_operator()));
609
110k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
110k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
110k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
110k
    return Status::OK();
613
110k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
80.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
80.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
80.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
80.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
80.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
80.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
80.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
80.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
80.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
80.9k
    if constexpr (!is_fake_shared) {
560
81.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
81.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
81.1k
                                    .first.get()
563
81.1k
                                    ->template cast<SharedStateArg>();
564
565
81.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
81.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
81.1k
                    _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
80.9k
    }
585
586
80.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
80.9k
    _rows_returned_counter =
591
80.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
80.9k
    _blocks_returned_counter =
593
80.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
80.9k
    _output_block_bytes_counter =
595
80.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
80.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
80.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
80.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
80.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
80.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
80.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
80.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
80.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
80.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
80.9k
    _memory_used_counter =
606
80.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
80.9k
    _common_profile->add_info_string("IsColocate",
608
80.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
80.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
80.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
80.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
80.9k
    return Status::OK();
613
80.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
118
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
118
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
118
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
118
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
118
    _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
118
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
118
    _operator_profile->add_child(_common_profile.get(), true);
557
118
    _operator_profile->add_child(_custom_profile.get(), true);
558
118
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
118
    if constexpr (!is_fake_shared) {
560
118
        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
118
        } 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
118
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
118
            _dependency = _shared_state->create_source_dependency(
576
118
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
118
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
118
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
118
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
118
    }
585
586
118
    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
118
    _rows_returned_counter =
591
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
118
    _blocks_returned_counter =
593
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
118
    _output_block_bytes_counter =
595
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
118
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
118
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
118
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
118
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
118
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
118
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
118
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
118
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
118
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
118
    _memory_used_counter =
606
118
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
118
    _common_profile->add_info_string("IsColocate",
608
118
                                     std::to_string(_parent->is_colocated_operator()));
609
118
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
118
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
118
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
118
    return Status::OK();
613
118
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.04M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.04M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.04M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.04M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.04M
    _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.04M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.04M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.04M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.04M
    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.04M
    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.04M
    _rows_returned_counter =
591
1.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.04M
    _blocks_returned_counter =
593
1.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.04M
    _output_block_bytes_counter =
595
1.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.04M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.04M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.04M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.04M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.04M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.04M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.04M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.04M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.04M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.04M
    _memory_used_counter =
606
1.04M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.04M
    _common_profile->add_info_string("IsColocate",
608
1.04M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.04M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.04M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.04M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.04M
    return Status::OK();
613
1.04M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
57.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
57.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
57.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
57.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
57.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
57.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
57.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
57.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
57.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
57.0k
    if constexpr (!is_fake_shared) {
560
57.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.0k
        } 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.94k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.94k
            _dependency = _shared_state->create_source_dependency(
576
4.94k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.94k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.94k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
52.1k
        }
584
57.0k
    }
585
586
57.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
57.0k
    _rows_returned_counter =
591
57.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
57.0k
    _blocks_returned_counter =
593
57.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
57.0k
    _output_block_bytes_counter =
595
57.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
57.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
57.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
57.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
57.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
57.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
57.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
57.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
57.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
57.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
57.0k
    _memory_used_counter =
606
57.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
57.0k
    _common_profile->add_info_string("IsColocate",
608
57.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
57.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
57.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
57.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
57.0k
    return Status::OK();
613
57.0k
}
_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
7.05k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
7.05k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
7.05k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
7.05k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
7.05k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
7.05k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
7.05k
    _operator_profile->add_child(_common_profile.get(), true);
557
7.05k
    _operator_profile->add_child(_custom_profile.get(), true);
558
7.05k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
7.05k
    if constexpr (!is_fake_shared) {
560
7.05k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
7.05k
        } 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.95k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.95k
            _dependency = _shared_state->create_source_dependency(
576
6.95k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.95k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.95k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.95k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
102
        }
584
7.05k
    }
585
586
7.05k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
7.05k
    _rows_returned_counter =
591
7.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
7.05k
    _blocks_returned_counter =
593
7.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
7.05k
    _output_block_bytes_counter =
595
7.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.05k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
7.05k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
7.05k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
7.05k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
7.05k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
7.05k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
7.05k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
7.05k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
7.05k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
7.05k
    _memory_used_counter =
606
7.05k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
7.05k
    _common_profile->add_info_string("IsColocate",
608
7.05k
                                     std::to_string(_parent->is_colocated_operator()));
609
7.05k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
7.05k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
7.05k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
7.05k
    return Status::OK();
613
7.05k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
694
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
694
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
694
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
694
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
694
    _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
694
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
694
    _operator_profile->add_child(_common_profile.get(), true);
557
694
    _operator_profile->add_child(_custom_profile.get(), true);
558
694
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
694
    if constexpr (!is_fake_shared) {
560
694
        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
694
        } 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
692
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
692
            _dependency = _shared_state->create_source_dependency(
576
692
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
692
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
692
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
692
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
694
    }
585
586
694
    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
694
    _rows_returned_counter =
591
694
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
694
    _blocks_returned_counter =
593
694
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
694
    _output_block_bytes_counter =
595
694
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
694
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
694
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
694
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
694
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
694
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
694
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
694
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
694
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
694
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
694
    _memory_used_counter =
606
694
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
694
    _common_profile->add_info_string("IsColocate",
608
694
                                     std::to_string(_parent->is_colocated_operator()));
609
694
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
694
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
694
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
694
    return Status::OK();
613
694
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.13k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.13k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.13k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.13k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.13k
    _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.13k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.13k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.13k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.13k
    if constexpr (!is_fake_shared) {
560
5.13k
        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.13k
        } 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.98k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.98k
            _dependency = _shared_state->create_source_dependency(
576
4.98k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.98k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.98k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.98k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
156
        }
584
5.13k
    }
585
586
5.13k
    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.13k
    _rows_returned_counter =
591
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.13k
    _blocks_returned_counter =
593
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.13k
    _output_block_bytes_counter =
595
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.13k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.13k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.13k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.13k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.13k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.13k
    _memory_used_counter =
606
5.13k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.13k
    _common_profile->add_info_string("IsColocate",
608
5.13k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.13k
    return Status::OK();
613
5.13k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
785k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
785k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
785k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
785k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
785k
    _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
785k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
785k
    _operator_profile->add_child(_common_profile.get(), true);
557
785k
    _operator_profile->add_child(_custom_profile.get(), true);
558
785k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
785k
    if constexpr (!is_fake_shared) {
560
785k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
771k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
771k
                                    .first.get()
563
771k
                                    ->template cast<SharedStateArg>();
564
565
771k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
771k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
771k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
771k
        } 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
13.5k
        } else {
580
13.5k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
13.5k
                DCHECK(false);
582
13.5k
            }
583
13.5k
        }
584
785k
    }
585
586
785k
    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
785k
    _rows_returned_counter =
591
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
785k
    _blocks_returned_counter =
593
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
785k
    _output_block_bytes_counter =
595
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
785k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
785k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
785k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
785k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
785k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
785k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
785k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
785k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
785k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
785k
    _memory_used_counter =
606
785k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
785k
    _common_profile->add_info_string("IsColocate",
608
785k
                                     std::to_string(_parent->is_colocated_operator()));
609
785k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
785k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
785k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
785k
    return Status::OK();
613
785k
}
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.45M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.45M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.77M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
322k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
322k
    }
621
2.45M
    if (_parent->has_projection()) {
622
407k
        const auto& projection = *_parent->_projection;
623
407k
        _projections.resize(projection.projections.size());
624
2.51M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.10M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.10M
        }
627
407k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
433k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
26.1k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
419k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
393k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
393k
                        state, _intermediate_projections[i][j]));
633
393k
            }
634
26.1k
        }
635
407k
    }
636
2.45M
    return Status::OK();
637
2.45M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
71.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
71.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
73.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.74k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.74k
    }
621
71.5k
    if (_parent->has_projection()) {
622
71.5k
        const auto& projection = *_parent->_projection;
623
71.5k
        _projections.resize(projection.projections.size());
624
391k
        for (size_t i = 0; i < _projections.size(); i++) {
625
320k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
320k
        }
627
71.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
81.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
325k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
315k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
315k
                        state, _intermediate_projections[i][j]));
633
315k
            }
634
10.2k
        }
635
71.5k
    }
636
71.5k
    return Status::OK();
637
71.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
9
        for (size_t i = 0; i < _projections.size(); i++) {
625
6
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
266k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
266k
    _conjuncts.resize(_parent->_conjuncts.size());
618
266k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
266k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
266k
    return Status::OK();
637
266k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
147
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
147
    _conjuncts.resize(_parent->_conjuncts.size());
618
147
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
147
    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
147
    return Status::OK();
637
147
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.91k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.91k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.96k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
55
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
55
    }
621
5.91k
    if (_parent->has_projection()) {
622
5.91k
        const auto& projection = *_parent->_projection;
623
5.91k
        _projections.resize(projection.projections.size());
624
24.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
18.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
18.4k
        }
627
5.91k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.93k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
20
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
166
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
146
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
146
                        state, _intermediate_projections[i][j]));
633
146
            }
634
20
        }
635
5.91k
    }
636
5.91k
    return Status::OK();
637
5.91k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.97k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.97k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
997
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
997
    }
621
8.97k
    if (_parent->has_projection()) {
622
4.78k
        const auto& projection = *_parent->_projection;
623
4.78k
        _projections.resize(projection.projections.size());
624
19.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
14.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
14.9k
        }
627
4.78k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.87k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
85
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
632
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
547
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
547
                        state, _intermediate_projections[i][j]));
633
547
            }
634
85
        }
635
4.78k
    }
636
8.97k
    return Status::OK();
637
8.97k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
110k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
110k
    _conjuncts.resize(_parent->_conjuncts.size());
618
111k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.28k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.28k
    }
621
110k
    if (_parent->has_projection()) {
622
34.9k
        const auto& projection = *_parent->_projection;
623
34.9k
        _projections.resize(projection.projections.size());
624
306k
        for (size_t i = 0; i < _projections.size(); i++) {
625
271k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
271k
        }
627
34.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
35.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
775
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.74k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.96k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.96k
                        state, _intermediate_projections[i][j]));
633
3.96k
            }
634
775
        }
635
34.9k
    }
636
110k
    return Status::OK();
637
110k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
81.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
81.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
81.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
30
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
30
    }
621
81.0k
    if (_parent->has_projection()) {
622
295
        const auto& projection = *_parent->_projection;
623
295
        _projections.resize(projection.projections.size());
624
1.26k
        for (size_t i = 0; i < _projections.size(); i++) {
625
974
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
974
        }
627
295
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
295
        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
295
    }
636
81.0k
    return Status::OK();
637
81.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
122
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
122
    _conjuncts.resize(_parent->_conjuncts.size());
618
122
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
122
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
11
        for (size_t i = 0; i < _projections.size(); i++) {
625
8
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
8
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
122
    return Status::OK();
637
122
}
_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
317k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
317k
    }
621
1.05M
    if (_parent->has_projection()) {
622
277k
        const auto& projection = *_parent->_projection;
623
277k
        _projections.resize(projection.projections.size());
624
1.65M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.37M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.37M
        }
627
277k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
292k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
85.2k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
70.4k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
70.4k
                        state, _intermediate_projections[i][j]));
633
70.4k
            }
634
14.8k
        }
635
277k
    }
636
1.05M
    return Status::OK();
637
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
57.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
57.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
57.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
57.2k
    if (_parent->has_projection()) {
622
12.3k
        const auto& projection = *_parent->_projection;
623
12.3k
        _projections.resize(projection.projections.size());
624
117k
        for (size_t i = 0; i < _projections.size(); i++) {
625
105k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
105k
        }
627
12.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
151
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.22k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.07k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.07k
                        state, _intermediate_projections[i][j]));
633
3.07k
            }
634
151
        }
635
12.3k
    }
636
57.2k
    return Status::OK();
637
57.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
7.04k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
7.04k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
890
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
890
    }
621
7.04k
    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
7.04k
    return Status::OK();
637
7.04k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
701
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
701
    _conjuncts.resize(_parent->_conjuncts.size());
618
701
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
701
    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
701
    return Status::OK();
637
701
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.17k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.17k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.17k
    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.17k
    if (_parent->has_projection()) {
622
79
        const auto& projection = *_parent->_projection;
623
79
        _projections.resize(projection.projections.size());
624
266
        for (size_t i = 0; i < _projections.size(); i++) {
625
187
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
187
        }
627
79
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79
        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
79
    }
636
5.17k
    return Status::OK();
637
5.17k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
790k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
790k
    _conjuncts.resize(_parent->_conjuncts.size());
618
790k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
790k
    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
790k
    return Status::OK();
637
790k
}
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.44k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.44k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.44k
    _terminated = true;
645
7.44k
    return Status::OK();
646
7.44k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
329
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
329
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
329
    _terminated = true;
645
329
    return Status::OK();
646
329
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
22
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
22
    _terminated = true;
645
22
    return Status::OK();
646
22
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
160
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
160
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
160
    _terminated = true;
645
160
    return Status::OK();
646
160
}
_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
5.37k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.37k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.37k
    _terminated = true;
645
5.37k
    return Status::OK();
646
5.37k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
64
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
64
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
64
    _terminated = true;
645
64
    return Status::OK();
646
64
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
210
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
210
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
210
    _terminated = true;
645
210
    return Status::OK();
646
210
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.21k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.21k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.21k
    _terminated = true;
645
1.21k
    return Status::OK();
646
1.21k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
37
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
37
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
37
    _terminated = true;
645
37
    return Status::OK();
646
37
}
647
648
template <typename SharedStateArg>
649
2.74M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.74M
    if (_closed) {
651
286k
        return Status::OK();
652
286k
    }
653
2.45M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.40M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.40M
    }
656
2.45M
    _closed = true;
657
2.45M
    return Status::OK();
658
2.74M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71.5k
    }
656
71.5k
    _closed = true;
657
71.5k
    return Status::OK();
658
71.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
526k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
526k
    if (_closed) {
651
264k
        return Status::OK();
652
264k
    }
653
262k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
262k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
262k
    }
656
262k
    _closed = true;
657
262k
    return Status::OK();
658
526k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
154
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
154
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
154
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
154
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
154
    }
656
154
    _closed = true;
657
154
    return Status::OK();
658
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.90k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.90k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.90k
    }
656
5.90k
    _closed = true;
657
5.90k
    return Status::OK();
658
5.90k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
8.90k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
8.90k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
8.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.90k
    }
656
8.90k
    _closed = true;
657
8.90k
    return Status::OK();
658
8.90k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
110k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
110k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
110k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
110k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
110k
    }
656
110k
    _closed = true;
657
110k
    return Status::OK();
658
110k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
80.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
80.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
80.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
80.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
80.7k
    }
656
80.7k
    _closed = true;
657
80.7k
    return Status::OK();
658
80.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
117
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
117
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
117
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
117
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
117
    }
656
117
    _closed = true;
657
117
    return Status::OK();
658
117
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.06M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.06M
    if (_closed) {
651
15.9k
        return Status::OK();
652
15.9k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.05M
    _closed = true;
657
1.05M
    return Status::OK();
658
1.06M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
57.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
57.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
57.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
57.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
57.2k
    }
656
57.2k
    _closed = true;
657
57.2k
    return Status::OK();
658
57.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7.03k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7.03k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7.03k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.03k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.03k
    }
656
7.03k
    _closed = true;
657
7.03k
    return Status::OK();
658
7.03k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.19k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.19k
    if (_closed) {
651
598
        return Status::OK();
652
598
    }
653
596
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
596
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
596
    }
656
596
    _closed = true;
657
596
    return Status::OK();
658
1.19k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.8k
    if (_closed) {
651
5.65k
        return Status::OK();
652
5.65k
    }
653
5.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.16k
    }
656
5.16k
    _closed = true;
657
5.16k
    return Status::OK();
658
10.8k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
791k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
791k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
791k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
791k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
791k
    }
656
791k
    _closed = true;
657
791k
    return Status::OK();
658
791k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
334
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
334
    if (_closed) {
651
174
        return Status::OK();
652
174
    }
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
334
}
659
660
template <typename SharedState>
661
2.02M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.02M
    _operator_profile =
664
2.02M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.02M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.02M
    _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.02M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.02M
    _operator_profile->add_child(_common_profile, true);
673
2.02M
    _operator_profile->add_child(_custom_profile, true);
674
675
2.02M
    _operator_profile->set_metadata(_parent->node_id());
676
2.02M
    _wait_for_finish_dependency_timer =
677
2.02M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.02M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.02M
    if constexpr (!is_fake_shared) {
680
1.39M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.39M
            info.shared_state_map.end()) {
682
381k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
284k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
284k
            }
685
381k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
381k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
381k
                                                  ? 0
688
381k
                                                  : info.task_idx]
689
381k
                                  .get();
690
381k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.01M
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
1.01M
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.01M
            _dependency = _shared_state->create_sink_dependency(
697
1.01M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.01M
        }
699
1.39M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.39M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.39M
    }
702
703
2.02M
    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.02M
    _rows_input_counter =
708
2.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.02M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.02M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.02M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.02M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.02M
    _memory_used_counter =
714
2.02M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.02M
    _common_profile->add_info_string("IsColocate",
716
2.02M
                                     std::to_string(_parent->is_colocated_operator()));
717
2.02M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.02M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.02M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.02M
    return Status::OK();
721
2.02M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
119k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
119k
    _operator_profile =
664
119k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
119k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
119k
    _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
119k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
119k
    _operator_profile->add_child(_common_profile, true);
673
119k
    _operator_profile->add_child(_custom_profile, true);
674
675
119k
    _operator_profile->set_metadata(_parent->node_id());
676
119k
    _wait_for_finish_dependency_timer =
677
119k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
119k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
119k
    if constexpr (!is_fake_shared) {
680
119k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
119k
            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
15.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
15.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
15.5k
                                                  ? 0
688
15.5k
                                                  : info.task_idx]
689
15.5k
                                  .get();
690
15.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
119k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
119k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
119k
    }
702
703
119k
    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
119k
    _rows_input_counter =
708
119k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
119k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
119k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
119k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
119k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
119k
    _memory_used_counter =
714
119k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
119k
    _common_profile->add_info_string("IsColocate",
716
119k
                                     std::to_string(_parent->is_colocated_operator()));
717
119k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
119k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
119k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
119k
    return Status::OK();
721
119k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _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
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            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
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    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
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
265k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
265k
    _operator_profile =
664
265k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
265k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
265k
    _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
265k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
265k
    _operator_profile->add_child(_common_profile, true);
673
265k
    _operator_profile->add_child(_custom_profile, true);
674
675
265k
    _operator_profile->set_metadata(_parent->node_id());
676
265k
    _wait_for_finish_dependency_timer =
677
265k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
265k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
265k
    if constexpr (!is_fake_shared) {
680
265k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
265k
            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
265k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
265k
            _shared_state = info.shared_state->template cast<SharedState>();
696
265k
            _dependency = _shared_state->create_sink_dependency(
697
265k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
265k
        }
699
265k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
265k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
265k
    }
702
703
265k
    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
265k
    _rows_input_counter =
708
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
265k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
265k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
265k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
265k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
265k
    _memory_used_counter =
714
265k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
265k
    _common_profile->add_info_string("IsColocate",
716
265k
                                     std::to_string(_parent->is_colocated_operator()));
717
265k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
265k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
265k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
265k
    return Status::OK();
721
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
161
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
161
    _operator_profile =
664
161
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
161
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
161
    _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
161
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
161
    _operator_profile->add_child(_common_profile, true);
673
161
    _operator_profile->add_child(_custom_profile, true);
674
675
161
    _operator_profile->set_metadata(_parent->node_id());
676
161
    _wait_for_finish_dependency_timer =
677
161
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
161
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
161
    if constexpr (!is_fake_shared) {
680
161
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
161
            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
161
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
161
            _shared_state = info.shared_state->template cast<SharedState>();
696
161
            _dependency = _shared_state->create_sink_dependency(
697
161
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
161
        }
699
161
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
161
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
161
    }
702
703
161
    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
161
    _rows_input_counter =
708
161
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
161
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
161
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
161
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
161
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
161
    _memory_used_counter =
714
161
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
161
    _common_profile->add_info_string("IsColocate",
716
161
                                     std::to_string(_parent->is_colocated_operator()));
717
161
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
161
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
161
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
161
    return Status::OK();
721
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.89k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.89k
    _operator_profile =
664
5.89k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.89k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.89k
    _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
5.89k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.89k
    _operator_profile->add_child(_common_profile, true);
673
5.89k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.89k
    _operator_profile->set_metadata(_parent->node_id());
676
5.89k
    _wait_for_finish_dependency_timer =
677
5.89k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.89k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.89k
    if constexpr (!is_fake_shared) {
680
5.89k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.89k
            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
5.89k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.89k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.89k
            _dependency = _shared_state->create_sink_dependency(
697
5.89k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.89k
        }
699
5.89k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.89k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.89k
    }
702
703
5.89k
    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
5.89k
    _rows_input_counter =
708
5.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.89k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.89k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.89k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.89k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.89k
    _memory_used_counter =
714
5.89k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.89k
    _common_profile->add_info_string("IsColocate",
716
5.89k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.89k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.89k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.89k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.89k
    return Status::OK();
721
5.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.95k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.95k
    _operator_profile =
664
8.95k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.95k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.95k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.95k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.95k
    _operator_profile->add_child(_common_profile, true);
673
8.95k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.95k
    _operator_profile->set_metadata(_parent->node_id());
676
8.95k
    _wait_for_finish_dependency_timer =
677
8.95k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.95k
    if constexpr (!is_fake_shared) {
680
8.95k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.95k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.95k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.95k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.95k
            _dependency = _shared_state->create_sink_dependency(
697
8.95k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.95k
        }
699
8.95k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.95k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.95k
    }
702
703
8.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.95k
    _rows_input_counter =
708
8.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.95k
    _memory_used_counter =
714
8.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.95k
    _common_profile->add_info_string("IsColocate",
716
8.95k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.95k
    return Status::OK();
721
8.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
110k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
110k
    _operator_profile =
664
110k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
110k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
110k
    _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
110k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
110k
    _operator_profile->add_child(_common_profile, true);
673
110k
    _operator_profile->add_child(_custom_profile, true);
674
675
110k
    _operator_profile->set_metadata(_parent->node_id());
676
110k
    _wait_for_finish_dependency_timer =
677
110k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
110k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
110k
    if constexpr (!is_fake_shared) {
680
110k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
110k
            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
110k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
110k
            _shared_state = info.shared_state->template cast<SharedState>();
696
110k
            _dependency = _shared_state->create_sink_dependency(
697
110k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
110k
        }
699
110k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
110k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
110k
    }
702
703
110k
    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
110k
    _rows_input_counter =
708
110k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
110k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
110k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
110k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
110k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
110k
    _memory_used_counter =
714
110k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
110k
    _common_profile->add_info_string("IsColocate",
716
110k
                                     std::to_string(_parent->is_colocated_operator()));
717
110k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
110k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
110k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
110k
    return Status::OK();
721
110k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
81.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
81.0k
    _operator_profile =
664
81.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
81.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
81.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
81.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
81.0k
    _operator_profile->add_child(_common_profile, true);
673
81.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
81.0k
    _operator_profile->set_metadata(_parent->node_id());
676
81.0k
    _wait_for_finish_dependency_timer =
677
81.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
81.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
81.0k
    if constexpr (!is_fake_shared) {
680
81.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
81.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
81.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
81.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
81.1k
                                                  ? 0
688
81.1k
                                                  : info.task_idx]
689
81.1k
                                  .get();
690
81.1k
            _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
81.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
81.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
81.0k
    }
702
703
81.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
81.0k
    _rows_input_counter =
708
81.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
81.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
81.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
81.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
81.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
81.0k
    _memory_used_counter =
714
81.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
81.0k
    _common_profile->add_info_string("IsColocate",
716
81.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
81.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
81.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
81.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
81.0k
    return Status::OK();
721
81.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
128
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
128
    _operator_profile =
664
128
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
128
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
128
    _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
128
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
128
    _operator_profile->add_child(_common_profile, true);
673
128
    _operator_profile->add_child(_custom_profile, true);
674
675
128
    _operator_profile->set_metadata(_parent->node_id());
676
128
    _wait_for_finish_dependency_timer =
677
128
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
128
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
128
    if constexpr (!is_fake_shared) {
680
128
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
128
            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
128
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
128
            _shared_state = info.shared_state->template cast<SharedState>();
696
128
            _dependency = _shared_state->create_sink_dependency(
697
128
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
128
        }
699
128
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
128
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
128
    }
702
703
128
    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
128
    _rows_input_counter =
708
128
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
128
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
128
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
128
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
128
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
128
    _memory_used_counter =
714
128
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
128
    _common_profile->add_info_string("IsColocate",
716
128
                                     std::to_string(_parent->is_colocated_operator()));
717
128
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
128
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
128
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
128
    return Status::OK();
721
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
625k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
625k
    _operator_profile =
664
625k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
625k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
625k
    _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
625k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
625k
    _operator_profile->add_child(_common_profile, true);
673
625k
    _operator_profile->add_child(_custom_profile, true);
674
675
625k
    _operator_profile->set_metadata(_parent->node_id());
676
625k
    _wait_for_finish_dependency_timer =
677
625k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
625k
    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
625k
    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
625k
    _rows_input_counter =
708
625k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
625k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
625k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
625k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
625k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
625k
    _memory_used_counter =
714
625k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
625k
    _common_profile->add_info_string("IsColocate",
716
625k
                                     std::to_string(_parent->is_colocated_operator()));
717
625k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
625k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
625k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
625k
    return Status::OK();
721
625k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.6k
    _operator_profile =
664
11.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.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
11.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.6k
    _operator_profile->add_child(_common_profile, true);
673
11.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.6k
    _operator_profile->set_metadata(_parent->node_id());
676
11.6k
    _wait_for_finish_dependency_timer =
677
11.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.6k
    if constexpr (!is_fake_shared) {
680
11.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.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
11.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.6k
            _dependency = _shared_state->create_sink_dependency(
697
11.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.6k
        }
699
11.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.6k
    }
702
703
11.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
11.6k
    _rows_input_counter =
708
11.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.6k
    _memory_used_counter =
714
11.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.6k
    _common_profile->add_info_string("IsColocate",
716
11.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.6k
    return Status::OK();
721
11.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
695
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
695
    _operator_profile =
664
695
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
695
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
695
    _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
695
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
695
    _operator_profile->add_child(_common_profile, true);
673
695
    _operator_profile->add_child(_custom_profile, true);
674
675
695
    _operator_profile->set_metadata(_parent->node_id());
676
695
    _wait_for_finish_dependency_timer =
677
695
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
695
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
695
    if constexpr (!is_fake_shared) {
680
695
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
695
            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
695
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
695
            _dependency = _shared_state->create_sink_dependency(
697
695
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
695
        }
699
695
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
695
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
695
    }
702
703
696
    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
695
    _rows_input_counter =
708
695
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
695
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
695
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
695
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
695
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
695
    _memory_used_counter =
714
695
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
695
    _common_profile->add_info_string("IsColocate",
716
695
                                     std::to_string(_parent->is_colocated_operator()));
717
695
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
695
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
695
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
695
    return Status::OK();
721
695
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.80k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.80k
    _operator_profile =
664
2.80k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.80k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.80k
    _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.80k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.80k
    _operator_profile->add_child(_common_profile, true);
673
2.80k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.80k
    _operator_profile->set_metadata(_parent->node_id());
676
2.80k
    _wait_for_finish_dependency_timer =
677
2.80k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.80k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.80k
    if constexpr (!is_fake_shared) {
680
2.80k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.80k
            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.80k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.80k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.80k
            _dependency = _shared_state->create_sink_dependency(
697
2.80k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.80k
        }
699
2.80k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.80k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.80k
    }
702
703
2.80k
    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.80k
    _rows_input_counter =
708
2.80k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.80k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.80k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.80k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.80k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.80k
    _memory_used_counter =
714
2.80k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.80k
    _common_profile->add_info_string("IsColocate",
716
2.80k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.80k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.80k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.80k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.80k
    return Status::OK();
721
2.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.5k
    _operator_profile =
664
12.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.5k
    _operator_profile->add_child(_common_profile, true);
673
12.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.5k
    _operator_profile->set_metadata(_parent->node_id());
676
12.5k
    _wait_for_finish_dependency_timer =
677
12.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.5k
    if constexpr (!is_fake_shared) {
680
12.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.5k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
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.5k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.5k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.5k
            _dependency = _shared_state->create_sink_dependency(
697
12.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.5k
        }
699
12.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.5k
    }
702
703
12.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.5k
    _rows_input_counter =
708
12.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.5k
    _memory_used_counter =
714
12.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.5k
    _common_profile->add_info_string("IsColocate",
716
12.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.5k
    return Status::OK();
721
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
284k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
284k
    _operator_profile =
664
284k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
284k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
284k
    _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
284k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
284k
    _operator_profile->add_child(_common_profile, true);
673
284k
    _operator_profile->add_child(_custom_profile, true);
674
675
284k
    _operator_profile->set_metadata(_parent->node_id());
676
284k
    _wait_for_finish_dependency_timer =
677
284k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
284k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
284k
    if constexpr (!is_fake_shared) {
680
284k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
284k
            info.shared_state_map.end()) {
682
284k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
284k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
284k
            }
685
284k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
284k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
284k
                                                  ? 0
688
284k
                                                  : info.task_idx]
689
284k
                                  .get();
690
284k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
284k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
284k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
284k
    }
702
703
284k
    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
284k
    _rows_input_counter =
708
284k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
284k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
284k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
284k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
284k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
284k
    _memory_used_counter =
714
284k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
284k
    _common_profile->add_info_string("IsColocate",
716
284k
                                     std::to_string(_parent->is_colocated_operator()));
717
284k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
284k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
284k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
284k
    return Status::OK();
721
284k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
494k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
494k
    _operator_profile =
664
494k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
494k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
494k
    _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
494k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
494k
    _operator_profile->add_child(_common_profile, true);
673
494k
    _operator_profile->add_child(_custom_profile, true);
674
675
494k
    _operator_profile->set_metadata(_parent->node_id());
676
494k
    _wait_for_finish_dependency_timer =
677
494k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
494k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
494k
    if constexpr (!is_fake_shared) {
680
494k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
494k
            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
494k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
494k
            _shared_state = info.shared_state->template cast<SharedState>();
696
494k
            _dependency = _shared_state->create_sink_dependency(
697
494k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
494k
        }
699
494k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
494k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
494k
    }
702
703
494k
    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
494k
    _rows_input_counter =
708
494k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
494k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
494k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
494k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
494k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
494k
    _memory_used_counter =
714
494k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
494k
    _common_profile->add_info_string("IsColocate",
716
494k
                                     std::to_string(_parent->is_colocated_operator()));
717
494k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
494k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
494k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
494k
    return Status::OK();
721
494k
}
_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
2.02M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.02M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
2.02M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.40M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.40M
    }
731
2.02M
    _closed = true;
732
2.02M
    return Status::OK();
733
2.02M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
119k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
119k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
119k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
119k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
119k
    }
731
119k
    _closed = true;
732
119k
    return Status::OK();
733
119k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
264k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
264k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
264k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
264k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
264k
    }
731
264k
    _closed = true;
732
264k
    return Status::OK();
733
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
152
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
152
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
150
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
150
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
150
    }
731
150
    _closed = true;
732
150
    return Status::OK();
733
152
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.90k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.90k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.90k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.90k
    }
731
5.90k
    _closed = true;
732
5.90k
    return Status::OK();
733
5.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.89k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.89k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.89k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.89k
    }
731
8.89k
    _closed = true;
732
8.89k
    return Status::OK();
733
8.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
110k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
110k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
110k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
110k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
110k
    }
731
110k
    _closed = true;
732
110k
    return Status::OK();
733
110k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
80.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
80.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
80.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
80.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
80.6k
    }
731
80.6k
    _closed = true;
732
80.6k
    return Status::OK();
733
80.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
117
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
117
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
117
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
117
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
117
    }
731
117
    _closed = true;
732
117
    return Status::OK();
733
117
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
628k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
628k
    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
628k
    _closed = true;
732
628k
    return Status::OK();
733
628k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.6k
    }
731
11.6k
    _closed = true;
732
11.6k
    return Status::OK();
733
11.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
599
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
599
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
599
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
599
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
599
    }
731
599
    _closed = true;
732
599
    return Status::OK();
733
599
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.82k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.82k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.82k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.82k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.82k
    }
731
2.82k
    _closed = true;
732
2.82k
    return Status::OK();
733
2.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.5k
    }
731
12.5k
    _closed = true;
732
12.5k
    return Status::OK();
733
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
285k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
285k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
285k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
285k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
285k
    }
731
285k
    _closed = true;
732
285k
    return Status::OK();
733
285k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
497k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
497k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
497k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
497k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
497k
    }
731
497k
    _closed = true;
732
497k
    return Status::OK();
733
497k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.23k
                                                          bool* eos) {
738
1.23k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.22k
    return pull(state, block, eos);
740
1.23k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
39
                                                          bool* eos) {
738
39
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
39
    return pull(state, block, eos);
740
39
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.19k
                                                          bool* eos) {
738
1.19k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.19k
    return pull(state, block, eos);
740
1.19k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
651k
                                                         bool* eos) {
745
651k
    auto& local_state = get_local_state(state);
746
651k
    if (need_more_input_data(state)) {
747
617k
        local_state._child_block->clear_column_data(
748
617k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
617k
                        .num_slots());
750
617k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
617k
                state, local_state._child_block.get(), &local_state._child_eos));
752
617k
        *eos = local_state._child_eos;
753
617k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
78.3k
            return Status::OK();
755
78.3k
        }
756
539k
        {
757
539k
            SCOPED_TIMER(local_state.exec_time_counter());
758
539k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
539k
        }
760
539k
    }
761
762
572k
    if (!need_more_input_data(state)) {
763
543k
        SCOPED_TIMER(local_state.exec_time_counter());
764
543k
        bool new_eos = false;
765
543k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
543k
        if (new_eos) {
767
468k
            *eos = true;
768
468k
        } else if (!need_more_input_data(state)) {
769
25.5k
            *eos = false;
770
25.5k
        }
771
543k
    }
772
572k
    return Status::OK();
773
572k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
135k
                                                         bool* eos) {
745
135k
    auto& local_state = get_local_state(state);
746
135k
    if (need_more_input_data(state)) {
747
114k
        local_state._child_block->clear_column_data(
748
114k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
114k
                        .num_slots());
750
114k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
114k
                state, local_state._child_block.get(), &local_state._child_eos));
752
114k
        *eos = local_state._child_eos;
753
114k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
33.7k
            return Status::OK();
755
33.7k
        }
756
81.1k
        {
757
81.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
81.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
81.1k
        }
760
81.1k
    }
761
762
101k
    if (!need_more_input_data(state)) {
763
101k
        SCOPED_TIMER(local_state.exec_time_counter());
764
101k
        bool new_eos = false;
765
101k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
101k
        if (new_eos) {
767
47.0k
            *eos = true;
768
54.5k
        } else if (!need_more_input_data(state)) {
769
11.5k
            *eos = false;
770
11.5k
        }
771
101k
    }
772
101k
    return Status::OK();
773
101k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.72k
                                                         bool* eos) {
745
4.72k
    auto& local_state = get_local_state(state);
746
4.72k
    if (need_more_input_data(state)) {
747
2.81k
        local_state._child_block->clear_column_data(
748
2.81k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.81k
                        .num_slots());
750
2.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.81k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.81k
        *eos = local_state._child_eos;
753
2.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
638
            return Status::OK();
755
638
        }
756
2.17k
        {
757
2.17k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.17k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.17k
        }
760
2.17k
    }
761
762
4.09k
    if (!need_more_input_data(state)) {
763
4.09k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.09k
        bool new_eos = false;
765
4.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.09k
        if (new_eos) {
767
1.57k
            *eos = true;
768
2.52k
        } else if (!need_more_input_data(state)) {
769
1.91k
            *eos = false;
770
1.91k
        }
771
4.09k
    }
772
4.08k
    return Status::OK();
773
4.08k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.95k
                                                         bool* eos) {
745
1.95k
    auto& local_state = get_local_state(state);
746
1.95k
    if (need_more_input_data(state)) {
747
1.95k
        local_state._child_block->clear_column_data(
748
1.95k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.95k
                        .num_slots());
750
1.95k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.95k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.95k
        *eos = local_state._child_eos;
753
1.95k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
788
            return Status::OK();
755
788
        }
756
1.16k
        {
757
1.16k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.16k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.16k
        }
760
1.16k
    }
761
762
1.16k
    if (!need_more_input_data(state)) {
763
1.16k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.16k
        bool new_eos = false;
765
1.16k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.16k
        if (new_eos) {
767
800
            *eos = true;
768
800
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.16k
    }
772
1.16k
    return Status::OK();
773
1.16k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.6k
                                                         bool* eos) {
745
20.6k
    auto& local_state = get_local_state(state);
746
20.6k
    if (need_more_input_data(state)) {
747
20.6k
        local_state._child_block->clear_column_data(
748
20.6k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
20.6k
                        .num_slots());
750
20.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
20.6k
                state, local_state._child_block.get(), &local_state._child_eos));
752
20.6k
        *eos = local_state._child_eos;
753
20.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.99k
            return Status::OK();
755
3.99k
        }
756
16.7k
        {
757
16.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
16.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
16.7k
        }
760
16.7k
    }
761
762
16.6k
    if (!need_more_input_data(state)) {
763
10.3k
        SCOPED_TIMER(local_state.exec_time_counter());
764
10.3k
        bool new_eos = false;
765
10.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
10.3k
        if (new_eos) {
767
10.0k
            *eos = true;
768
10.0k
        } else if (!need_more_input_data(state)) {
769
13
            *eos = false;
770
13
        }
771
10.3k
    }
772
16.6k
    return Status::OK();
773
16.6k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
459k
                                                         bool* eos) {
745
459k
    auto& local_state = get_local_state(state);
746
460k
    if (need_more_input_data(state)) {
747
460k
        local_state._child_block->clear_column_data(
748
460k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
460k
                        .num_slots());
750
460k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
460k
                state, local_state._child_block.get(), &local_state._child_eos));
752
460k
        *eos = local_state._child_eos;
753
460k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
38.2k
            return Status::OK();
755
38.2k
        }
756
422k
        {
757
422k
            SCOPED_TIMER(local_state.exec_time_counter());
758
422k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
422k
        }
760
422k
    }
761
762
421k
    if (!need_more_input_data(state)) {
763
399k
        SCOPED_TIMER(local_state.exec_time_counter());
764
399k
        bool new_eos = false;
765
399k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
399k
        if (new_eos) {
767
398k
            *eos = true;
768
398k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
399k
    }
772
421k
    return Status::OK();
773
421k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.5k
                                                         bool* eos) {
745
21.5k
    auto& local_state = get_local_state(state);
746
21.5k
    if (need_more_input_data(state)) {
747
9.76k
        local_state._child_block->clear_column_data(
748
9.76k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.76k
                        .num_slots());
750
9.76k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.76k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.76k
        *eos = local_state._child_eos;
753
9.76k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
334
            return Status::OK();
755
334
        }
756
9.42k
        {
757
9.42k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.42k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.42k
        }
760
9.42k
    }
761
762
21.1k
    if (!need_more_input_data(state)) {
763
20.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.5k
        bool new_eos = false;
765
20.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.5k
        if (new_eos) {
767
5.88k
            *eos = true;
768
14.6k
        } else if (!need_more_input_data(state)) {
769
11.7k
            *eos = false;
770
11.7k
        }
771
20.5k
    }
772
21.1k
    return Status::OK();
773
21.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.73k
                                                         bool* eos) {
745
7.73k
    auto& local_state = get_local_state(state);
746
7.73k
    if (need_more_input_data(state)) {
747
7.36k
        local_state._child_block->clear_column_data(
748
7.36k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.36k
                        .num_slots());
750
7.36k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.36k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.36k
        *eos = local_state._child_eos;
753
7.36k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
616
            return Status::OK();
755
616
        }
756
6.75k
        {
757
6.75k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.75k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.75k
        }
760
6.75k
    }
761
762
7.11k
    if (!need_more_input_data(state)) {
763
7.11k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.11k
        bool new_eos = false;
765
7.11k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.11k
        if (new_eos) {
767
4.59k
            *eos = true;
768
4.59k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.11k
    }
772
7.10k
    return Status::OK();
773
7.10k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
51.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
51.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
51.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
51.0k
                                                         "AsyncWriterDependency", true);
781
51.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
51.0k
                             _finish_dependency));
783
784
51.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
51.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
51.0k
    return Status::OK();
787
51.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
370
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
370
    RETURN_IF_ERROR(Base::init(state, info));
779
370
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
370
                                                         "AsyncWriterDependency", true);
781
370
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
370
                             _finish_dependency));
783
784
370
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
370
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
370
    return Status::OK();
787
370
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
50.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.6k
                                                         "AsyncWriterDependency", true);
781
50.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.6k
                             _finish_dependency));
783
784
50.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.6k
    return Status::OK();
787
50.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
18
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
18
    RETURN_IF_ERROR(Base::init(state, info));
779
18
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
18
                                                         "AsyncWriterDependency", true);
781
18
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
18
                             _finish_dependency));
783
784
18
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
18
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
18
    return Status::OK();
787
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
51.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
51.7k
    RETURN_IF_ERROR(Base::open(state));
793
51.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
394k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
342k
        RETURN_IF_ERROR(
796
342k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
342k
    }
798
51.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
51.7k
    return Status::OK();
800
51.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
372
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
372
    RETURN_IF_ERROR(Base::open(state));
793
372
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.49k
        RETURN_IF_ERROR(
796
1.49k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.49k
    }
798
372
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
372
    return Status::OK();
800
372
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
51.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
51.3k
    RETURN_IF_ERROR(Base::open(state));
793
51.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
392k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
341k
        RETURN_IF_ERROR(
796
341k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
341k
    }
798
51.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
51.3k
    return Status::OK();
800
51.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
18
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
18
    RETURN_IF_ERROR(Base::open(state));
793
18
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
324
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
306
        RETURN_IF_ERROR(
796
306
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
306
    }
798
18
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
18
    return Status::OK();
800
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
67.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
67.3k
    return _writer->sink(block, eos);
806
67.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.47k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.47k
    return _writer->sink(block, eos);
806
1.47k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
65.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.8k
    return _writer->sink(block, eos);
806
65.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
18
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
18
    return _writer->sink(block, eos);
806
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
51.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.8k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
51.9k
    if (_writer) {
818
51.9k
        Status st = _writer->get_writer_status();
819
51.9k
        if (exec_status.ok()) {
820
51.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
51.7k
                                                       : Status::Cancelled("force close"));
822
51.7k
        } else {
823
150
            _writer->force_close(exec_status);
824
150
        }
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
51.9k
        RETURN_IF_ERROR(st);
829
51.9k
    }
830
51.7k
    return Base::close(state, exec_status);
831
51.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
361
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
361
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
361
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
361
    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
361
    if (_writer) {
818
361
        Status st = _writer->get_writer_status();
819
361
        if (exec_status.ok()) {
820
361
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
361
                                                       : Status::Cancelled("force close"));
822
361
        } 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
361
        RETURN_IF_ERROR(st);
829
361
    }
830
361
    return Base::close(state, exec_status);
831
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
51.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
51.5k
    if (_writer) {
818
51.5k
        Status st = _writer->get_writer_status();
819
51.5k
        if (exec_status.ok()) {
820
51.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
51.3k
                                                       : Status::Cancelled("force close"));
822
51.3k
        } else {
823
150
            _writer->force_close(exec_status);
824
150
        }
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
51.5k
        RETURN_IF_ERROR(st);
829
51.5k
    }
830
51.3k
    return Base::close(state, exec_status);
831
51.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
18
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
18
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
18
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
18
    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
18
    if (_writer) {
818
18
        Status st = _writer->get_writer_status();
819
18
        if (exec_status.ok()) {
820
18
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
18
                                                       : Status::Cancelled("force close"));
822
18
        } 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
18
        RETURN_IF_ERROR(st);
829
18
    }
830
18
    return Base::close(state, exec_status);
831
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris