Coverage Report

Created: 2026-11-02 08:02

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.79M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.79M
    if (_parent->nereids_id() == -1) {
123
932k
        return fmt::format("(id={})", _parent->node_id());
124
932k
    } else {
125
867k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
867k
    }
127
1.79M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
77.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
77.9k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
77.9k
    } else {
125
77.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
77.9k
    }
127
77.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
265k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
265k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
265k
    } else {
125
265k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
265k
    }
127
265k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
159
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
159
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
159
    } else {
125
159
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
159
    }
127
159
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
7.97k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
7.97k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
7.97k
    } else {
125
7.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
7.97k
    }
127
7.97k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.56k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.56k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.50k
    } else {
125
9.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.50k
    }
127
9.56k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
108k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
108k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
108k
    } else {
125
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
108k
    }
127
108k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
95.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
95.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
95.2k
    } else {
125
95.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
95.2k
    }
127
95.2k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
131
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
131
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
131
    } else {
125
131
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
131
    }
127
131
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
497k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
497k
    if (_parent->nereids_id() == -1) {
123
256k
        return fmt::format("(id={})", _parent->node_id());
124
256k
    } else {
125
241k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
241k
    }
127
497k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.3k
    } else {
125
56.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.3k
    }
127
56.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.75k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.75k
    if (_parent->nereids_id() == -1) {
123
6.73k
        return fmt::format("(id={})", _parent->node_id());
124
6.73k
    } else {
125
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
24
    }
127
6.75k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
471
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
471
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
369
    } else {
125
369
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
369
    }
127
471
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.12k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.12k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.10k
    } else {
125
5.10k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.10k
    }
127
5.12k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
668k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
668k
    if (_parent->nereids_id() == -1) {
123
668k
        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
668k
}
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.29M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.29M
    if (_parent->nereids_id() == -1) {
132
664k
        return fmt::format("(id={})", _parent->node_id());
133
664k
    } else {
134
627k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
627k
    }
136
1.29M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
126k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
126k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
126k
    } else {
134
126k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
126k
    }
136
126k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
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
269k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
269k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
269k
    } else {
134
269k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
269k
    }
136
269k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
167
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
167
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
167
    } else {
134
167
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
167
    }
136
167
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
7.98k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
7.98k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
7.98k
    } else {
134
7.98k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
7.98k
    }
136
7.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.59k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.59k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.53k
    } else {
134
9.53k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.53k
    }
136
9.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
108k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
108k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
108k
    } else {
134
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
108k
    }
136
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
94.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
94.8k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
94.8k
    } else {
134
94.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
94.8k
    }
136
94.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
141
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
141
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
141
    } else {
134
141
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
141
    }
136
141
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
31
    if (_parent->nereids_id() == -1) {
132
31
        return fmt::format("(id={})", _parent->node_id());
133
31
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
31
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.0k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.0k
    } else {
134
10.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.0k
    }
136
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
470
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
470
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
368
    } else {
134
368
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
368
    }
136
470
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.4k
    if (_parent->nereids_id() == -1) {
132
12.4k
        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.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
238k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
239k
    if (_parent->nereids_id() == -1) {
132
239k
        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
238k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
412k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
412k
    if (_parent->nereids_id() == -1) {
132
412k
        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
412k
}
_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
32.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.0k
    _terminated = true;
144
32.0k
    return Status::OK();
145
32.0k
}
_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.25k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.25k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.25k
    _terminated = true;
144
2.25k
    return Status::OK();
145
2.25k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
_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
2.83k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.83k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.83k
    _terminated = true;
144
2.83k
    return Status::OK();
145
2.83k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
425
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
425
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
425
    _terminated = true;
144
425
    return Status::OK();
145
425
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
401
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
401
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
401
    _terminated = true;
144
401
    return Status::OK();
145
401
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
49
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
49
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
49
    _terminated = true;
144
49
    return Status::OK();
145
49
}
_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
295
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
295
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
295
    _terminated = true;
144
295
    return Status::OK();
145
295
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
128
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
128
    _terminated = true;
144
128
    return Status::OK();
145
128
}
146
147
303k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
303k
    return _child && _child->is_serial_operator() && !is_source()
149
303k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
303k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
303k
}
152
153
23.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
23.3k
    if (!_child) {
155
22.7k
        return false;
156
22.7k
    }
157
664
    if (_child->is_serial_operator()) {
158
22
        return true;
159
22
    }
160
642
    const auto child_distribution = _child->required_data_distribution(state);
161
642
    return child_distribution.need_local_exchange() &&
162
642
           !is_shuffled_exchange(child_distribution.distribution_type);
163
664
}
164
165
template <typename SharedStateArg>
166
16.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.1k
    fmt::memory_buffer debug_string_buffer;
168
16.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.1k
    return fmt::to_string(debug_string_buffer);
170
16.1k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
35
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
35
    fmt::memory_buffer debug_string_buffer;
168
35
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
35
    return fmt::to_string(debug_string_buffer);
170
35
}
_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
21
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
21
    fmt::memory_buffer debug_string_buffer;
168
21
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
21
    return fmt::to_string(debug_string_buffer);
170
21
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
96
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
96
    fmt::memory_buffer debug_string_buffer;
168
96
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
96
    return fmt::to_string(debug_string_buffer);
170
96
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.8k
    fmt::memory_buffer debug_string_buffer;
168
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.8k
    return fmt::to_string(debug_string_buffer);
170
15.8k
}
_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
168
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
168
    fmt::memory_buffer debug_string_buffer;
168
168
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
168
    return fmt::to_string(debug_string_buffer);
170
168
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.0k
    fmt::memory_buffer debug_string_buffer;
175
16.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.0k
    return fmt::to_string(debug_string_buffer);
177
16.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
21
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
21
    fmt::memory_buffer debug_string_buffer;
175
21
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
21
    return fmt::to_string(debug_string_buffer);
177
21
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
96
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
96
    fmt::memory_buffer debug_string_buffer;
175
96
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
96
    return fmt::to_string(debug_string_buffer);
177
96
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
112
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
112
    fmt::memory_buffer debug_string_buffer;
175
112
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
112
    return fmt::to_string(debug_string_buffer);
177
112
}
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
120
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
120
    fmt::memory_buffer debug_string_buffer;
175
120
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
120
    return fmt::to_string(debug_string_buffer);
177
120
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.7k
    fmt::memory_buffer debug_string_buffer;
175
15.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.7k
    return fmt::to_string(debug_string_buffer);
177
15.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
16.2k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
16.2k
    fmt::memory_buffer debug_string_buffer;
181
16.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
16.2k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
16.2k
                   _is_serial_operator);
184
16.2k
    return fmt::to_string(debug_string_buffer);
185
16.2k
}
186
187
16.1k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.1k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.1k
}
190
191
675k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
675k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
675k
    _nereids_id = tnode.nereids_id;
194
675k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.80k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.80k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.80k
            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.80k
    }
207
675k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
675k
    _op_name = substr + "_OPERATOR";
209
210
675k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
675k
    } else if (tnode.__isset.conjuncts) {
213
285k
        for (const auto& conjunct : tnode.conjuncts) {
214
285k
            VExprContextSPtr context;
215
285k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
285k
            _conjuncts.emplace_back(context);
217
285k
        }
218
106k
    }
219
220
    // create the projections expr
221
675k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
675k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.80k
        DCHECK(has_projection()) << "no final projections";
226
6.80k
        _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.80k
    }
233
675k
    return Status::OK();
234
675k
}
235
236
702k
Status OperatorXBase::prepare(RuntimeState* state) {
237
702k
    for (auto& conjunct : _conjuncts) {
238
285k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
285k
    }
240
702k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
651k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
348k
            return a->execute_cost() < b->execute_cost();
243
348k
        });
244
651k
    };
245
246
702k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        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
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
702k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
702k
    if (has_projection()) {
269
276k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
276k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
276k
    }
274
702k
    if (_child && !is_source()) {
275
80.6k
        RETURN_IF_ERROR(_child->prepare(state));
276
80.6k
    }
277
278
702k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
702k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
702k
    return Status::OK();
284
702k
}
285
286
8.64k
Status OperatorXBase::terminate(RuntimeState* state) {
287
8.64k
    if (_child && !is_source()) {
288
595
        RETURN_IF_ERROR(_child->terminate(state));
289
595
    }
290
8.64k
    auto result = state->get_local_state_result(operator_id());
291
8.64k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
8.64k
    return result.value()->terminate(state);
295
8.64k
}
296
297
4.74M
Status OperatorXBase::close(RuntimeState* state) {
298
4.74M
    if (_child && !is_source()) {
299
630k
        RETURN_IF_ERROR(_child->close(state));
300
630k
    }
301
4.74M
    auto result = state->get_local_state_result(operator_id());
302
4.74M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.74M
    return result.value()->close(state);
306
4.74M
}
307
308
309k
void PipelineXLocalStateBase::clear_origin_block() {
309
309k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
309k
}
311
312
879k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
879k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
879k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
879k
    return Status::OK();
317
879k
}
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
309k
                                     Block* output_block) const {
326
309k
    auto* local_state = state->get_local_state(operator_id());
327
309k
    SCOPED_TIMER(local_state->exec_time_counter());
328
309k
    SCOPED_TIMER(local_state->_projection_timer);
329
309k
    const size_t rows = origin_block->rows();
330
309k
    if (rows == 0) {
331
157k
        return Status::OK();
332
157k
    }
333
152k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
152k
    {
336
152k
        Block input_block = *origin_block;
337
338
152k
        ColumnsWithTypeAndName new_columns;
339
152k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.50k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.50k
            new_columns.resize(projections.size());
345
123k
            for (int i = 0; i < projections.size(); i++) {
346
118k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
118k
                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
118k
            }
355
5.49k
            Block tmp_block {new_columns};
356
5.49k
            input_block.swap(tmp_block);
357
5.49k
        }
358
359
152k
        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
152k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
152k
                output_block, _projection->output_row_descriptor);
368
152k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
152k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
152k
        Columns shared_columns(mutable_columns.size());
371
372
839k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
687k
            ColumnPtr column_ptr;
374
687k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
687k
            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
687k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
687k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
687k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
446k
            } else {
388
446k
                shared_columns[i] = std::move(column_ptr);
389
446k
            }
390
687k
        }
391
392
152k
        scoped_mutable_block.restore();
393
839k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
687k
            if (shared_columns[i]) {
395
447k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
447k
            }
397
687k
        }
398
152k
    }
399
400
0
    origin_block->clear_column_data(
401
152k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
152k
    DCHECK_EQ(output_block->rows(), rows);
403
404
152k
    return Status::OK();
405
152k
}
406
407
4.34M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.34M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.34M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.34M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.34M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.34M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.34M
            if (_debug_point_count++ % 2 == 0) {
414
4.34M
                return Status::OK();
415
4.34M
            }
416
4.34M
        }
417
4.34M
    });
418
419
4.34M
    Status status;
420
4.34M
    auto* local_state = state->get_local_state(operator_id());
421
4.34M
    Defer defer([&]() {
422
4.34M
        if (status.ok()) {
423
4.34M
            local_state->update_output_block_counters(*block);
424
4.34M
        }
425
4.34M
    });
426
4.34M
    if (has_projection()) {
427
309k
        local_state->clear_origin_block();
428
309k
        status = get_block(state, &local_state->_origin_block, eos);
429
309k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
309k
        status = do_projections(state, &local_state->_origin_block, block);
433
309k
        return status;
434
309k
    }
435
4.03M
    status = get_block(state, block, eos);
436
4.03M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.03M
    return status;
438
4.03M
}
439
440
3.01M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
3.01M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
3.01M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
3.01M
        auto op_name = to_lower(_parent->_op_name);
448
3.01M
        auto arg_op_name = dp->param<std::string>("op_name");
449
3.01M
        arg_op_name = to_lower(arg_op_name);
450
451
3.01M
        if (op_name == arg_op_name) {
452
3.01M
            *eos = true;
453
3.01M
        }
454
3.01M
    });
455
456
3.01M
    if (auto rows = block->rows()) {
457
830k
        _num_rows_returned += rows;
458
830k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
830k
    }
460
3.01M
}
461
462
32.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.0k
    auto result = state->get_sink_local_state_result();
464
32.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.0k
    return result.value()->terminate(state);
468
32.0k
}
469
470
16.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.0k
    fmt::memory_buffer debug_string_buffer;
472
473
16.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.0k
    return fmt::to_string(debug_string_buffer);
476
16.0k
}
477
478
16.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.0k
}
481
482
357k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
357k
    std::string op_name = "UNKNOWN_SINK";
484
357k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
358k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
358k
        op_name = it->second;
488
358k
    }
489
357k
    _name = op_name + "_OPERATOR";
490
357k
    return Status::OK();
491
357k
}
492
493
310k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
310k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
310k
    _nereids_id = tnode.nereids_id;
496
310k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
310k
    _name = substr + "_SINK_OPERATOR";
498
310k
    return Status::OK();
499
310k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.83M
                                                            LocalSinkStateInfo& info) {
504
1.83M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.83M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.83M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.83M
    return Status::OK();
508
1.83M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
126k
                                                            LocalSinkStateInfo& info) {
504
126k
    auto local_state = LocalStateType::create_unique(this, state);
505
126k
    RETURN_IF_ERROR(local_state->init(state, info));
506
126k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
126k
    return Status::OK();
508
126k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
363k
                                                            LocalSinkStateInfo& info) {
504
363k
    auto local_state = LocalStateType::create_unique(this, state);
505
363k
    RETURN_IF_ERROR(local_state->init(state, info));
506
363k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
363k
    return Status::OK();
508
363k
}
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
360
                                                            LocalSinkStateInfo& info) {
504
360
    auto local_state = LocalStateType::create_unique(this, state);
505
360
    RETURN_IF_ERROR(local_state->init(state, info));
506
360
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
360
    return Status::OK();
508
360
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.8k
                                                            LocalSinkStateInfo& info) {
504
49.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.8k
    return Status::OK();
508
49.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_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
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.51k
                                                            LocalSinkStateInfo& info) {
504
9.51k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.51k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.51k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.51k
    return Status::OK();
508
9.51k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
270k
                                                            LocalSinkStateInfo& info) {
504
270k
    auto local_state = LocalStateType::create_unique(this, state);
505
270k
    RETURN_IF_ERROR(local_state->init(state, info));
506
270k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
270k
    return Status::OK();
508
270k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
167
                                                            LocalSinkStateInfo& info) {
504
167
    auto local_state = LocalStateType::create_unique(this, state);
505
167
    RETURN_IF_ERROR(local_state->init(state, info));
506
167
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
167
    return Status::OK();
508
167
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
239k
                                                            LocalSinkStateInfo& info) {
504
239k
    auto local_state = LocalStateType::create_unique(this, state);
505
239k
    RETURN_IF_ERROR(local_state->init(state, info));
506
239k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
239k
    return Status::OK();
508
239k
}
_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
94.9k
                                                            LocalSinkStateInfo& info) {
504
94.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
94.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
94.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
94.9k
    return Status::OK();
508
94.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
141
                                                            LocalSinkStateInfo& info) {
504
141
    auto local_state = LocalStateType::create_unique(this, state);
505
141
    RETURN_IF_ERROR(local_state->init(state, info));
506
141
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
141
    return Status::OK();
508
141
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
540k
                                                            LocalSinkStateInfo& info) {
504
540k
    auto local_state = LocalStateType::create_unique(this, state);
505
540k
    RETURN_IF_ERROR(local_state->init(state, info));
506
540k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
540k
    return Status::OK();
508
540k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.99k
                                                            LocalSinkStateInfo& info) {
504
7.99k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.99k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.99k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.99k
    return Status::OK();
508
7.99k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.0k
                                                            LocalSinkStateInfo& info) {
504
10.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.0k
    return Status::OK();
508
10.0k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.94k
                                                            LocalSinkStateInfo& info) {
504
2.94k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.94k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.94k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.94k
    return Status::OK();
508
2.94k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
367
                                                            LocalSinkStateInfo& info) {
504
367
    auto local_state = LocalStateType::create_unique(this, state);
505
367
    RETURN_IF_ERROR(local_state->init(state, info));
506
367
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
367
    return Status::OK();
508
367
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.74k
                                                            LocalSinkStateInfo& info) {
504
4.74k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.74k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.74k
    return Status::OK();
508
4.74k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.54k
                                                            LocalSinkStateInfo& info) {
504
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.54k
    return Status::OK();
508
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.59k
                                                            LocalSinkStateInfo& info) {
504
2.59k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.59k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.59k
    return Status::OK();
508
2.59k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.48k
                                                            LocalSinkStateInfo& info) {
504
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.48k
    return Status::OK();
508
2.48k
}
_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
568
                                                            LocalSinkStateInfo& info) {
504
568
    auto local_state = LocalStateType::create_unique(this, state);
505
568
    RETURN_IF_ERROR(local_state->init(state, info));
506
568
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
568
    return Status::OK();
508
568
}
_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.46M
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.46M
    } else {
519
1.46M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.46M
        ss->id = operator_id();
521
1.46M
        for (auto& dest : dests_id()) {
522
1.45M
            ss->related_op_ids.insert(dest);
523
1.45M
        }
524
1.46M
        return ss;
525
1.46M
    }
526
1.46M
}
_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
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
363k
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
363k
    } else {
519
363k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
363k
        ss->id = operator_id();
521
363k
        for (auto& dest : dests_id()) {
522
362k
            ss->related_op_ids.insert(dest);
523
362k
        }
524
363k
        return ss;
525
363k
    }
526
363k
}
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
360
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
360
    } else {
519
360
        auto ss = LocalStateType::SharedStateType::create_shared();
520
360
        ss->id = operator_id();
521
360
        for (auto& dest : dests_id()) {
522
360
            ss->related_op_ids.insert(dest);
523
360
        }
524
360
        return ss;
525
360
    }
526
360
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
50.0k
    } else {
519
50.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.0k
        ss->id = operator_id();
521
50.0k
        for (auto& dest : dests_id()) {
522
49.5k
            ss->related_op_ids.insert(dest);
523
49.5k
        }
524
50.0k
        return ss;
525
50.0k
    }
526
50.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
14
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
14
    } else {
519
14
        auto ss = LocalStateType::SharedStateType::create_shared();
520
14
        ss->id = operator_id();
521
14
        for (auto& dest : dests_id()) {
522
14
            ss->related_op_ids.insert(dest);
523
14
        }
524
14
        return ss;
525
14
    }
526
14
}
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
9.65k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.65k
    } else {
519
9.65k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.65k
        ss->id = operator_id();
521
9.65k
        for (auto& dest : dests_id()) {
522
9.64k
            ss->related_op_ids.insert(dest);
523
9.64k
        }
524
9.65k
        return ss;
525
9.65k
    }
526
9.65k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
271k
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
271k
    } else {
519
271k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
271k
        ss->id = operator_id();
521
271k
        for (auto& dest : dests_id()) {
522
270k
            ss->related_op_ids.insert(dest);
523
270k
        }
524
271k
        return ss;
525
271k
    }
526
271k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
169
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
169
    } else {
519
169
        auto ss = LocalStateType::SharedStateType::create_shared();
520
169
        ss->id = operator_id();
521
169
        for (auto& dest : dests_id()) {
522
168
            ss->related_op_ids.insert(dest);
523
168
        }
524
169
        return ss;
525
169
    }
526
169
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
109k
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
109k
    } else {
519
109k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
109k
        ss->id = operator_id();
521
109k
        for (auto& dest : dests_id()) {
522
109k
            ss->related_op_ids.insert(dest);
523
109k
        }
524
109k
        return ss;
525
109k
    }
526
109k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
139
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
139
    } else {
519
139
        auto ss = LocalStateType::SharedStateType::create_shared();
520
139
        ss->id = operator_id();
521
140
        for (auto& dest : dests_id()) {
522
140
            ss->related_op_ids.insert(dest);
523
140
        }
524
139
        return ss;
525
139
    }
526
139
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
542k
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
542k
    } else {
519
542k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
542k
        ss->id = operator_id();
521
542k
        for (auto& dest : dests_id()) {
522
533k
            ss->related_op_ids.insert(dest);
523
533k
        }
524
542k
        return ss;
525
542k
    }
526
542k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
7.99k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
7.99k
    } else {
519
7.99k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7.99k
        ss->id = operator_id();
521
7.99k
        for (auto& dest : dests_id()) {
522
7.99k
            ss->related_op_ids.insert(dest);
523
7.99k
        }
524
7.99k
        return ss;
525
7.99k
    }
526
7.99k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
473
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
473
    } else {
519
473
        auto ss = LocalStateType::SharedStateType::create_shared();
520
473
        ss->id = operator_id();
521
473
        for (auto& dest : dests_id()) {
522
473
            ss->related_op_ids.insert(dest);
523
473
        }
524
473
        return ss;
525
473
    }
526
473
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.59k
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.59k
    } else {
519
2.59k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.59k
        ss->id = operator_id();
521
2.59k
        for (auto& dest : dests_id()) {
522
2.59k
            ss->related_op_ids.insert(dest);
523
2.59k
        }
524
2.59k
        return ss;
525
2.59k
    }
526
2.59k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.48k
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.48k
    } else {
519
2.48k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.48k
        ss->id = operator_id();
521
2.49k
        for (auto& dest : dests_id()) {
522
2.49k
            ss->related_op_ids.insert(dest);
523
2.49k
        }
524
2.48k
        return ss;
525
2.48k
    }
526
2.48k
}
_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
567
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
567
    } else {
519
567
        auto ss = LocalStateType::SharedStateType::create_shared();
520
567
        ss->id = operator_id();
521
567
        for (auto& dest : dests_id()) {
522
560
            ss->related_op_ids.insert(dest);
523
560
        }
524
567
        return ss;
525
567
    }
526
567
}
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.08M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.08M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.08M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.08M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.08M
    return Status::OK();
534
2.08M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
78.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
78.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
78.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
78.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
78.3k
    return Status::OK();
534
78.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
260k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
260k
    auto local_state = LocalStateType::create_unique(state, this);
531
260k
    RETURN_IF_ERROR(local_state->init(state, info));
532
260k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
260k
    return Status::OK();
534
260k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
129
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
129
    auto local_state = LocalStateType::create_unique(state, this);
531
129
    RETURN_IF_ERROR(local_state->init(state, info));
532
129
    state->emplace_local_state(operator_id(), std::move(local_state));
533
129
    return Status::OK();
534
129
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.37k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.37k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.37k
    return Status::OK();
534
3.37k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.51k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.51k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.51k
    return Status::OK();
534
9.51k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.88k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.88k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.88k
    return Status::OK();
534
8.88k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
160
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
160
    auto local_state = LocalStateType::create_unique(state, this);
531
160
    RETURN_IF_ERROR(local_state->init(state, info));
532
160
    state->emplace_local_state(operator_id(), std::move(local_state));
533
160
    return Status::OK();
534
160
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
260k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
260k
    auto local_state = LocalStateType::create_unique(state, this);
531
260k
    RETURN_IF_ERROR(local_state->init(state, info));
532
260k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
260k
    return Status::OK();
534
260k
}
_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
95.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
95.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
95.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
95.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
95.4k
    return Status::OK();
534
95.4k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
131
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
131
    auto local_state = LocalStateType::create_unique(state, this);
531
131
    RETURN_IF_ERROR(local_state->init(state, info));
532
131
    state->emplace_local_state(operator_id(), std::move(local_state));
533
131
    return Status::OK();
534
131
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.43k
    return Status::OK();
534
6.43k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
257k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
257k
    auto local_state = LocalStateType::create_unique(state, this);
531
257k
    RETURN_IF_ERROR(local_state->init(state, info));
532
257k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
257k
    return Status::OK();
534
257k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.18k
    return Status::OK();
534
1.18k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.99k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.99k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.99k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.99k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.99k
    return Status::OK();
534
7.99k
}
_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
56.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.3k
    return Status::OK();
534
56.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.80k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.80k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.80k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.80k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.80k
    return Status::OK();
534
6.80k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
365
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
365
    auto local_state = LocalStateType::create_unique(state, this);
531
365
    RETURN_IF_ERROR(local_state->init(state, info));
532
365
    state->emplace_local_state(operator_id(), std::move(local_state));
533
365
    return Status::OK();
534
365
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.61k
    return Status::OK();
534
2.61k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.51k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.51k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.51k
    return Status::OK();
534
2.51k
}
_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.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
677k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
677k
    auto local_state = LocalStateType::create_unique(state, this);
531
677k
    RETURN_IF_ERROR(local_state->init(state, info));
532
677k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
677k
    return Status::OK();
534
677k
}
_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
863
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
863
    auto local_state = LocalStateType::create_unique(state, this);
531
863
    RETURN_IF_ERROR(local_state->init(state, info));
532
863
    state->emplace_local_state(operator_id(), std::move(local_state));
533
863
    return Status::OK();
534
863
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.08k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.08k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.08k
    return Status::OK();
534
9.08k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
207k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
207k
    auto local_state = LocalStateType::create_unique(state, this);
531
207k
    RETURN_IF_ERROR(local_state->init(state, info));
532
207k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
207k
    return Status::OK();
534
207k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.83M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.06M
        : _num_rows_returned(0),
542
2.06M
          _rows_returned_counter(nullptr),
543
2.06M
          _parent(parent),
544
2.06M
          _state(state),
545
2.06M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.08M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.08M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.08M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.08M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.08M
    _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.08M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.08M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.08M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.08M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.08M
    if constexpr (!is_fake_shared) {
560
1.32M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
789k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
789k
                                    .first.get()
563
789k
                                    ->template cast<SharedStateArg>();
564
565
789k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
789k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
789k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
789k
        } else if (info.shared_state) {
569
460k
            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
460k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
460k
            _dependency = _shared_state->create_source_dependency(
576
460k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
460k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
460k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
460k
        } else {
580
72.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.81k
                DCHECK(false);
582
8.81k
            }
583
72.0k
        }
584
1.32M
    }
585
586
2.08M
    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.08M
    _rows_returned_counter =
591
2.08M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.08M
    _blocks_returned_counter =
593
2.08M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.08M
    _output_block_bytes_counter =
595
2.08M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.08M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.08M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.08M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.08M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.08M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.08M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.08M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.08M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.08M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.08M
    _memory_used_counter =
606
2.08M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.08M
    _common_profile->add_info_string("IsColocate",
608
2.08M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.08M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.08M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.08M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.08M
    return Status::OK();
613
2.08M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
78.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
78.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
78.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
78.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
78.5k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
78.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
78.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
78.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
78.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
78.5k
    if constexpr (!is_fake_shared) {
560
78.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
22.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
22.0k
                                    .first.get()
563
22.0k
                                    ->template cast<SharedStateArg>();
564
565
22.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
22.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
22.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
55.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.7k
            _dependency = _shared_state->create_source_dependency(
576
55.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
746
        }
584
78.5k
    }
585
586
78.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
78.5k
    _rows_returned_counter =
591
78.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
78.5k
    _blocks_returned_counter =
593
78.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
78.5k
    _output_block_bytes_counter =
595
78.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
78.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
78.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
78.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
78.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
78.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
78.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
78.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
78.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
78.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
78.5k
    _memory_used_counter =
606
78.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
78.5k
    _common_profile->add_info_string("IsColocate",
608
78.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
78.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
78.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
78.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
78.5k
    return Status::OK();
613
78.5k
}
_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
270k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
270k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
270k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
270k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
270k
    _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
270k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
270k
    _operator_profile->add_child(_common_profile.get(), true);
557
270k
    _operator_profile->add_child(_custom_profile.get(), true);
558
270k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
270k
    if constexpr (!is_fake_shared) {
560
270k
        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
270k
        } 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
261k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
261k
            _dependency = _shared_state->create_source_dependency(
576
261k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
261k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
261k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
261k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.88k
        }
584
270k
    }
585
586
270k
    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
270k
    _rows_returned_counter =
591
270k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
270k
    _blocks_returned_counter =
593
270k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
270k
    _output_block_bytes_counter =
595
270k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
270k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
270k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
270k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
270k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
270k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
270k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
270k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
270k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
270k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
270k
    _memory_used_counter =
606
270k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
270k
    _common_profile->add_info_string("IsColocate",
608
270k
                                     std::to_string(_parent->is_colocated_operator()));
609
270k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
270k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
270k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
270k
    return Status::OK();
613
270k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
160
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
160
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
160
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
160
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
160
    _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
160
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
160
    _operator_profile->add_child(_common_profile.get(), true);
557
160
    _operator_profile->add_child(_custom_profile.get(), true);
558
160
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
160
    if constexpr (!is_fake_shared) {
560
160
        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
160
        } 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
160
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
160
            _dependency = _shared_state->create_source_dependency(
576
160
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
160
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
160
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
160
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
160
    }
585
586
160
    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
160
    _rows_returned_counter =
591
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
160
    _blocks_returned_counter =
593
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
160
    _output_block_bytes_counter =
595
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
160
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
160
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
160
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
160
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
160
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
160
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
160
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
160
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
160
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
160
    _memory_used_counter =
606
160
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
160
    _common_profile->add_info_string("IsColocate",
608
160
                                     std::to_string(_parent->is_colocated_operator()));
609
160
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
160
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
160
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
160
    return Status::OK();
613
160
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.00k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.00k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.00k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.00k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.00k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
8.00k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.00k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.00k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.00k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.00k
    if constexpr (!is_fake_shared) {
560
8.00k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
8.00k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
7.98k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
7.98k
            _dependency = _shared_state->create_source_dependency(
576
7.98k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
7.98k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
7.98k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
7.98k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
21
        }
584
8.00k
    }
585
586
8.00k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
8.00k
    _rows_returned_counter =
591
8.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.00k
    _blocks_returned_counter =
593
8.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.00k
    _output_block_bytes_counter =
595
8.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.00k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.00k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.00k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.00k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.00k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.00k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.00k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.00k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.00k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.00k
    _memory_used_counter =
606
8.00k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.00k
    _common_profile->add_info_string("IsColocate",
608
8.00k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.00k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.00k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.00k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.00k
    return Status::OK();
613
8.00k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.62k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.62k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.62k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.62k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.62k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.62k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.62k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.62k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.62k
    if constexpr (!is_fake_shared) {
560
9.62k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.62k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.54k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.54k
            _dependency = _shared_state->create_source_dependency(
576
9.54k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.54k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.54k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.54k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
85
        }
584
9.62k
    }
585
586
9.62k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.62k
    _rows_returned_counter =
591
9.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.62k
    _blocks_returned_counter =
593
9.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.62k
    _output_block_bytes_counter =
595
9.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.62k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.62k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.62k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.62k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.62k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.62k
    _memory_used_counter =
606
9.62k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.62k
    _common_profile->add_info_string("IsColocate",
608
9.62k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.62k
    return Status::OK();
613
9.62k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
109k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
109k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
109k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
109k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
109k
    _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
109k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
109k
    _operator_profile->add_child(_common_profile.get(), true);
557
109k
    _operator_profile->add_child(_custom_profile.get(), true);
558
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
109k
    if constexpr (!is_fake_shared) {
560
109k
        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
109k
        } 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
107k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
107k
            _dependency = _shared_state->create_source_dependency(
576
107k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
107k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
107k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
107k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.53k
        }
584
109k
    }
585
586
109k
    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
109k
    _rows_returned_counter =
591
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
109k
    _blocks_returned_counter =
593
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
109k
    _output_block_bytes_counter =
595
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
109k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
109k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
109k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
109k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
109k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
109k
    _memory_used_counter =
606
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
109k
    _common_profile->add_info_string("IsColocate",
608
109k
                                     std::to_string(_parent->is_colocated_operator()));
609
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
109k
    return Status::OK();
613
109k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
95.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
95.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
95.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
95.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
95.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
95.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
95.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
95.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
95.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
95.4k
    if constexpr (!is_fake_shared) {
560
95.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
95.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
95.4k
                                    .first.get()
563
95.4k
                                    ->template cast<SharedStateArg>();
564
565
95.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
95.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
95.4k
                    _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
95.4k
    }
585
586
95.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
95.4k
    _rows_returned_counter =
591
95.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
95.4k
    _blocks_returned_counter =
593
95.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
95.4k
    _output_block_bytes_counter =
595
95.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
95.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
95.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
95.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
95.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
95.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
95.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
95.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
95.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
95.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
95.4k
    _memory_used_counter =
606
95.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
95.4k
    _common_profile->add_info_string("IsColocate",
608
95.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
95.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
95.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
95.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
95.4k
    return Status::OK();
613
95.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
131
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
131
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
131
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
131
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
131
    _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
131
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
131
    _operator_profile->add_child(_common_profile.get(), true);
557
131
    _operator_profile->add_child(_custom_profile.get(), true);
558
131
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
131
    if constexpr (!is_fake_shared) {
560
131
        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
131
        } 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
131
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
131
            _dependency = _shared_state->create_source_dependency(
576
131
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
131
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
131
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
131
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
131
    }
585
586
131
    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
131
    _rows_returned_counter =
591
131
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
131
    _blocks_returned_counter =
593
131
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
131
    _output_block_bytes_counter =
595
131
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
131
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
131
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
131
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
131
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
131
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
131
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
131
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
131
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
131
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
131
    _memory_used_counter =
606
131
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
131
    _common_profile->add_info_string("IsColocate",
608
131
                                     std::to_string(_parent->is_colocated_operator()));
609
131
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
131
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
131
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
131
    return Status::OK();
613
131
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
762k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
762k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
762k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
762k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
762k
    _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
762k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
762k
    _operator_profile->add_child(_common_profile.get(), true);
557
762k
    _operator_profile->add_child(_custom_profile.get(), true);
558
762k
    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
762k
    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
762k
    _rows_returned_counter =
591
762k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
762k
    _blocks_returned_counter =
593
762k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
762k
    _output_block_bytes_counter =
595
762k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
762k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
762k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
762k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
762k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
762k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
762k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
762k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
762k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
762k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
762k
    _memory_used_counter =
606
762k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
762k
    _common_profile->add_info_string("IsColocate",
608
762k
                                     std::to_string(_parent->is_colocated_operator()));
609
762k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
762k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
762k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
762k
    return Status::OK();
613
762k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.3k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.3k
    if constexpr (!is_fake_shared) {
560
56.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.3k
        } 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.52k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.52k
            _dependency = _shared_state->create_source_dependency(
576
4.52k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.52k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.52k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.7k
        }
584
56.3k
    }
585
586
56.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.3k
    _rows_returned_counter =
591
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.3k
    _blocks_returned_counter =
593
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.3k
    _output_block_bytes_counter =
595
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.3k
    _memory_used_counter =
606
56.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.3k
    _common_profile->add_info_string("IsColocate",
608
56.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.3k
    return Status::OK();
613
56.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.84k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.84k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.84k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.84k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.84k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
6.84k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.84k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.84k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.84k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.84k
    if constexpr (!is_fake_shared) {
560
6.84k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
6.84k
        } 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.68k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.68k
            _dependency = _shared_state->create_source_dependency(
576
6.68k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.68k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.68k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.68k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
160
        }
584
6.84k
    }
585
586
6.84k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
6.84k
    _rows_returned_counter =
591
6.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.84k
    _blocks_returned_counter =
593
6.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.84k
    _output_block_bytes_counter =
595
6.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.84k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.84k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.84k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.84k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.84k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.84k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.84k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.84k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.84k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.84k
    _memory_used_counter =
606
6.84k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.84k
    _common_profile->add_info_string("IsColocate",
608
6.84k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.84k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.84k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.84k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.84k
    return Status::OK();
613
6.84k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
472
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
472
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
472
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
472
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
472
    _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
472
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
472
    _operator_profile->add_child(_common_profile.get(), true);
557
472
    _operator_profile->add_child(_custom_profile.get(), true);
558
472
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
472
    if constexpr (!is_fake_shared) {
560
472
        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
472
        } 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
471
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
471
            _dependency = _shared_state->create_source_dependency(
576
471
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
471
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
471
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
471
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1
        }
584
472
    }
585
586
472
    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
472
    _rows_returned_counter =
591
472
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
472
    _blocks_returned_counter =
593
472
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
472
    _output_block_bytes_counter =
595
472
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
472
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
472
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
472
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
472
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
472
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
472
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
472
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
472
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
472
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
472
    _memory_used_counter =
606
472
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
472
    _common_profile->add_info_string("IsColocate",
608
472
                                     std::to_string(_parent->is_colocated_operator()));
609
472
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
472
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
472
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
472
    return Status::OK();
613
472
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.14k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.14k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.14k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.14k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.14k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.14k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.14k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.14k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.14k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.14k
    if constexpr (!is_fake_shared) {
560
5.14k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.14k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.06k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.06k
            _dependency = _shared_state->create_source_dependency(
576
5.06k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.06k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.06k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.06k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
81
        }
584
5.14k
    }
585
586
5.14k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.14k
    _rows_returned_counter =
591
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.14k
    _blocks_returned_counter =
593
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.14k
    _output_block_bytes_counter =
595
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.14k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.14k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.14k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.14k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.14k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.14k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.14k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.14k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.14k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.14k
    _memory_used_counter =
606
5.14k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.14k
    _common_profile->add_info_string("IsColocate",
608
5.14k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.14k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.14k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.14k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.14k
    return Status::OK();
613
5.14k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
680k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
680k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
680k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
680k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
680k
    _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
680k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
680k
    _operator_profile->add_child(_common_profile.get(), true);
557
680k
    _operator_profile->add_child(_custom_profile.get(), true);
558
680k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
680k
    if constexpr (!is_fake_shared) {
560
680k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
672k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
672k
                                    .first.get()
563
672k
                                    ->template cast<SharedStateArg>();
564
565
672k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
672k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
672k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
672k
        } 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
8.81k
        } else {
580
8.81k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.81k
                DCHECK(false);
582
8.81k
            }
583
8.81k
        }
584
680k
    }
585
586
680k
    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
680k
    _rows_returned_counter =
591
680k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
680k
    _blocks_returned_counter =
593
680k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
680k
    _output_block_bytes_counter =
595
680k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
680k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
680k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
680k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
680k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
680k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
680k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
680k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
680k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
680k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
680k
    _memory_used_counter =
606
680k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
680k
    _common_profile->add_info_string("IsColocate",
608
680k
                                     std::to_string(_parent->is_colocated_operator()));
609
680k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
680k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
680k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
680k
    return Status::OK();
613
680k
}
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.09M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.09M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.41M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
315k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
315k
    }
621
2.09M
    if (_parent->has_projection()) {
622
415k
        const auto& projection = *_parent->_projection;
623
415k
        _projections.resize(projection.projections.size());
624
2.56M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.15M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.15M
        }
627
415k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
439k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
23.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
385k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
361k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
361k
                        state, _intermediate_projections[i][j]));
633
361k
            }
634
23.9k
        }
635
415k
    }
636
2.09M
    return Status::OK();
637
2.09M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
78.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
78.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
80.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.21k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.21k
    }
621
78.7k
    if (_parent->has_projection()) {
622
78.7k
        const auto& projection = *_parent->_projection;
623
78.7k
        _projections.resize(projection.projections.size());
624
447k
        for (size_t i = 0; i < _projections.size(); i++) {
625
368k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
368k
        }
627
78.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
88.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.60k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
299k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
290k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
290k
                        state, _intermediate_projections[i][j]));
633
290k
            }
634
9.60k
        }
635
78.7k
    }
636
78.7k
    return Status::OK();
637
78.7k
}
_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
272k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
272k
    _conjuncts.resize(_parent->_conjuncts.size());
618
272k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
272k
    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
272k
    return Status::OK();
637
272k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
155
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
155
    _conjuncts.resize(_parent->_conjuncts.size());
618
155
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
155
    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
155
    return Status::OK();
637
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.00k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.00k
    _conjuncts.resize(_parent->_conjuncts.size());
618
8.09k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
93
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
93
    }
621
8.00k
    if (_parent->has_projection()) {
622
8.00k
        const auto& projection = *_parent->_projection;
623
8.00k
        _projections.resize(projection.projections.size());
624
34.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
26.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
26.7k
        }
627
8.00k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
8.03k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
29
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
319
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
290
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
290
                        state, _intermediate_projections[i][j]));
633
290
            }
634
29
        }
635
8.00k
    }
636
8.00k
    return Status::OK();
637
8.00k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.66k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.66k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
803
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
803
    }
621
9.66k
    if (_parent->has_projection()) {
622
5.01k
        const auto& projection = *_parent->_projection;
623
5.01k
        _projections.resize(projection.projections.size());
624
20.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.9k
        }
627
5.01k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.09k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
85
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
640
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
555
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
555
                        state, _intermediate_projections[i][j]));
633
555
            }
634
85
        }
635
5.01k
    }
636
9.66k
    return Status::OK();
637
9.66k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
109k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
109k
    _conjuncts.resize(_parent->_conjuncts.size());
618
111k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.55k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.55k
    }
621
109k
    if (_parent->has_projection()) {
622
34.2k
        const auto& projection = *_parent->_projection;
623
34.2k
        _projections.resize(projection.projections.size());
624
299k
        for (size_t i = 0; i < _projections.size(); i++) {
625
265k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
265k
        }
627
34.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
35.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
831
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.28k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.45k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.45k
                        state, _intermediate_projections[i][j]));
633
4.45k
            }
634
831
        }
635
34.2k
    }
636
109k
    return Status::OK();
637
109k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
95.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
95.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
95.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
19
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
19
    }
621
95.5k
    if (_parent->has_projection()) {
622
307
        const auto& projection = *_parent->_projection;
623
307
        _projections.resize(projection.projections.size());
624
1.40k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.09k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.09k
        }
627
307
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
307
        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
307
    }
636
95.5k
    return Status::OK();
637
95.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
135
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
135
    _conjuncts.resize(_parent->_conjuncts.size());
618
135
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
135
    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
135
    return Status::OK();
637
135
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
767k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
767k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.07M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
767k
    if (_parent->has_projection()) {
622
276k
        const auto& projection = *_parent->_projection;
623
276k
        _projections.resize(projection.projections.size());
624
1.64M
        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
276k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
289k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
13.3k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
77.6k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
64.3k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
64.3k
                        state, _intermediate_projections[i][j]));
633
64.3k
            }
634
13.3k
        }
635
276k
    }
636
767k
    return Status::OK();
637
767k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.6k
    if (_parent->has_projection()) {
622
12.0k
        const auto& projection = *_parent->_projection;
623
12.0k
        _projections.resize(projection.projections.size());
624
116k
        for (size_t i = 0; i < _projections.size(); i++) {
625
104k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
104k
        }
627
12.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
85
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.55k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.46k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.46k
                        state, _intermediate_projections[i][j]));
633
1.46k
            }
634
85
        }
635
12.0k
    }
636
56.6k
    return Status::OK();
637
56.6k
}
_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
6.84k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.84k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.33k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
490
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
490
    }
621
6.84k
    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
6.84k
    return Status::OK();
637
6.84k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
474
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
474
    _conjuncts.resize(_parent->_conjuncts.size());
618
474
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
474
    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
474
    return Status::OK();
637
474
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.16k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.16k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.16k
    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.16k
    if (_parent->has_projection()) {
622
104
        const auto& projection = *_parent->_projection;
623
104
        _projections.resize(projection.projections.size());
624
316
        for (size_t i = 0; i < _projections.size(); i++) {
625
212
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
212
        }
627
104
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
104
        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
104
    }
636
5.16k
    return Status::OK();
637
5.16k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
684k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
684k
    _conjuncts.resize(_parent->_conjuncts.size());
618
684k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
684k
    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
684k
    return Status::OK();
637
684k
}
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
8.64k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.64k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.64k
    _terminated = true;
645
8.64k
    return Status::OK();
646
8.64k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
434
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
434
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
434
    _terminated = true;
645
434
    return Status::OK();
646
434
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
69
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
69
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
69
    _terminated = true;
645
69
    return Status::OK();
646
69
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
24
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
24
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
24
    _terminated = true;
645
24
    return Status::OK();
646
24
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_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_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.86k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.86k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.86k
    _terminated = true;
645
6.86k
    return Status::OK();
646
6.86k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.10k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.10k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.10k
    _terminated = true;
645
1.10k
    return Status::OK();
646
1.10k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.38M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.38M
    if (_closed) {
651
294k
        return Status::OK();
652
294k
    }
653
2.09M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.32M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.32M
    }
656
2.09M
    _closed = true;
657
2.09M
    return Status::OK();
658
2.38M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
78.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
78.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
78.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
78.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
78.6k
    }
656
78.6k
    _closed = true;
657
78.6k
    return Status::OK();
658
78.6k
}
_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
539k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
539k
    if (_closed) {
651
270k
        return Status::OK();
652
270k
    }
653
268k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
268k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
268k
    }
656
268k
    _closed = true;
657
268k
    return Status::OK();
658
539k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
160
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
160
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
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
160
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7.99k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7.99k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7.99k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.99k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.99k
    }
656
7.99k
    _closed = true;
657
7.99k
    return Status::OK();
658
7.99k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.60k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.60k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.60k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.60k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.60k
    }
656
9.60k
    _closed = true;
657
9.60k
    return Status::OK();
658
9.60k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
109k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
109k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
109k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
109k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
109k
    }
656
109k
    _closed = true;
657
109k
    return Status::OK();
658
109k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
95.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
95.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
95.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
95.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
95.1k
    }
656
95.1k
    _closed = true;
657
95.1k
    return Status::OK();
658
95.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
130
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
130
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
130
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
130
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
130
    }
656
130
    _closed = true;
657
130
    return Status::OK();
658
130
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
784k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
784k
    if (_closed) {
651
17.5k
        return Status::OK();
652
17.5k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
767k
    _closed = true;
657
767k
    return Status::OK();
658
784k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.6k
    }
656
56.6k
    _closed = true;
657
56.6k
    return Status::OK();
658
56.6k
}
_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
6.83k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.83k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.83k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.83k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.83k
    }
656
6.83k
    _closed = true;
657
6.83k
    return Status::OK();
658
6.83k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
743
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
743
    if (_closed) {
651
371
        return Status::OK();
652
371
    }
653
372
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
372
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
372
    }
656
372
    _closed = true;
657
372
    return Status::OK();
658
743
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.4k
    if (_closed) {
651
5.32k
        return Status::OK();
652
5.32k
    }
653
5.15k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.15k
    }
656
5.15k
    _closed = true;
657
5.15k
    return Status::OK();
658
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
685k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
685k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
685k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
685k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
685k
    }
656
685k
    _closed = true;
657
685k
    return Status::OK();
658
685k
}
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
1.84M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.84M
    _operator_profile =
664
1.84M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.84M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.84M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.84M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.84M
    _operator_profile->add_child(_common_profile, true);
673
1.84M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.84M
    _operator_profile->set_metadata(_parent->node_id());
676
1.84M
    _wait_for_finish_dependency_timer =
677
1.84M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.84M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.84M
    if constexpr (!is_fake_shared) {
680
1.30M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.30M
            info.shared_state_map.end()) {
682
357k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
239k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
239k
            }
685
357k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
357k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
357k
                                                  ? 0
688
357k
                                                  : info.task_idx]
689
357k
                                  .get();
690
357k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
945k
        } else {
692
945k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
409
                DCHECK(false);
694
409
            }
695
945k
            _shared_state = info.shared_state->template cast<SharedState>();
696
945k
            _dependency = _shared_state->create_sink_dependency(
697
945k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
945k
        }
699
1.30M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.30M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.30M
    }
702
703
1.84M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.84M
    _rows_input_counter =
708
1.84M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.84M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.84M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.84M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.84M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.84M
    _memory_used_counter =
714
1.84M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.84M
    _common_profile->add_info_string("IsColocate",
716
1.84M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.84M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.84M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.84M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.84M
    return Status::OK();
721
1.84M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
126k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
126k
    _operator_profile =
664
126k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
126k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
126k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
126k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
126k
    _operator_profile->add_child(_common_profile, true);
673
126k
    _operator_profile->add_child(_custom_profile, true);
674
675
126k
    _operator_profile->set_metadata(_parent->node_id());
676
126k
    _wait_for_finish_dependency_timer =
677
126k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
126k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
126k
    if constexpr (!is_fake_shared) {
680
126k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
126k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
22.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
22.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
22.2k
                                                  ? 0
688
22.2k
                                                  : info.task_idx]
689
22.2k
                                  .get();
690
22.2k
            _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
126k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
126k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
126k
    }
702
703
126k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
126k
    _rows_input_counter =
708
126k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
126k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
126k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
126k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
126k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
126k
    _memory_used_counter =
714
126k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
126k
    _common_profile->add_info_string("IsColocate",
716
126k
                                     std::to_string(_parent->is_colocated_operator()));
717
126k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
126k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
126k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
126k
    return Status::OK();
721
126k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
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
271k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
271k
    _operator_profile =
664
271k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
271k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
271k
    _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
271k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
271k
    _operator_profile->add_child(_common_profile, true);
673
271k
    _operator_profile->add_child(_custom_profile, true);
674
675
271k
    _operator_profile->set_metadata(_parent->node_id());
676
271k
    _wait_for_finish_dependency_timer =
677
271k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
271k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
271k
    if constexpr (!is_fake_shared) {
680
271k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
271k
            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
271k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
271k
            _shared_state = info.shared_state->template cast<SharedState>();
696
271k
            _dependency = _shared_state->create_sink_dependency(
697
271k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
271k
        }
699
271k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
271k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
271k
    }
702
703
271k
    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
271k
    _rows_input_counter =
708
271k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
271k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
271k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
271k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
271k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
271k
    _memory_used_counter =
714
271k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
271k
    _common_profile->add_info_string("IsColocate",
716
271k
                                     std::to_string(_parent->is_colocated_operator()));
717
271k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
271k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
271k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
271k
    return Status::OK();
721
271k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
167
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
167
    _operator_profile =
664
167
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
167
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
167
    _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
167
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
167
    _operator_profile->add_child(_common_profile, true);
673
167
    _operator_profile->add_child(_custom_profile, true);
674
675
167
    _operator_profile->set_metadata(_parent->node_id());
676
167
    _wait_for_finish_dependency_timer =
677
167
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
167
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
167
    if constexpr (!is_fake_shared) {
680
167
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
167
            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
167
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
167
            _shared_state = info.shared_state->template cast<SharedState>();
696
167
            _dependency = _shared_state->create_sink_dependency(
697
167
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
167
        }
699
167
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
167
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
167
    }
702
703
167
    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
167
    _rows_input_counter =
708
167
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
167
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
167
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
167
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
167
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
167
    _memory_used_counter =
714
167
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
167
    _common_profile->add_info_string("IsColocate",
716
167
                                     std::to_string(_parent->is_colocated_operator()));
717
167
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
167
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
167
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
167
    return Status::OK();
721
167
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.99k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.99k
    _operator_profile =
664
7.99k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.99k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.99k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
7.99k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.99k
    _operator_profile->add_child(_common_profile, true);
673
7.99k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.99k
    _operator_profile->set_metadata(_parent->node_id());
676
7.99k
    _wait_for_finish_dependency_timer =
677
7.99k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.99k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.99k
    if constexpr (!is_fake_shared) {
680
7.99k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.99k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
7.99k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.99k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.99k
            _dependency = _shared_state->create_sink_dependency(
697
7.99k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.99k
        }
699
7.99k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.99k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.99k
    }
702
703
7.99k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
7.99k
    _rows_input_counter =
708
7.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.99k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.99k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.99k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.99k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.99k
    _memory_used_counter =
714
7.99k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.99k
    _common_profile->add_info_string("IsColocate",
716
7.99k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.99k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.99k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.99k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.99k
    return Status::OK();
721
7.99k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.65k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.65k
    _operator_profile =
664
9.65k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.65k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.65k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.65k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.65k
    _operator_profile->add_child(_common_profile, true);
673
9.65k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.65k
    _operator_profile->set_metadata(_parent->node_id());
676
9.65k
    _wait_for_finish_dependency_timer =
677
9.65k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.65k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.65k
    if constexpr (!is_fake_shared) {
680
9.65k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.65k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.65k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.65k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.65k
            _dependency = _shared_state->create_sink_dependency(
697
9.65k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.65k
        }
699
9.65k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.65k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.65k
    }
702
703
9.65k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.65k
    _rows_input_counter =
708
9.65k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.65k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.65k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.65k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.65k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.65k
    _memory_used_counter =
714
9.65k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.65k
    _common_profile->add_info_string("IsColocate",
716
9.65k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.65k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.65k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.65k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.65k
    return Status::OK();
721
9.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
109k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
109k
    _operator_profile =
664
109k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
109k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
109k
    _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
109k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
109k
    _operator_profile->add_child(_common_profile, true);
673
109k
    _operator_profile->add_child(_custom_profile, true);
674
675
109k
    _operator_profile->set_metadata(_parent->node_id());
676
109k
    _wait_for_finish_dependency_timer =
677
109k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
109k
    if constexpr (!is_fake_shared) {
680
109k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
109k
            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
109k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
109k
            _shared_state = info.shared_state->template cast<SharedState>();
696
109k
            _dependency = _shared_state->create_sink_dependency(
697
109k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
109k
        }
699
109k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
109k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
109k
    }
702
703
109k
    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
109k
    _rows_input_counter =
708
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
109k
    _memory_used_counter =
714
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
109k
    _common_profile->add_info_string("IsColocate",
716
109k
                                     std::to_string(_parent->is_colocated_operator()));
717
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
109k
    return Status::OK();
721
109k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
95.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
95.4k
    _operator_profile =
664
95.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
95.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
95.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
95.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
95.4k
    _operator_profile->add_child(_common_profile, true);
673
95.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
95.4k
    _operator_profile->set_metadata(_parent->node_id());
676
95.4k
    _wait_for_finish_dependency_timer =
677
95.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
95.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
95.4k
    if constexpr (!is_fake_shared) {
680
95.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
95.4k
            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
95.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
95.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
95.4k
                                                  ? 0
688
95.4k
                                                  : info.task_idx]
689
95.4k
                                  .get();
690
95.4k
            _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
95.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
95.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
95.4k
    }
702
703
95.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
95.4k
    _rows_input_counter =
708
95.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
95.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
95.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
95.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
95.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
95.4k
    _memory_used_counter =
714
95.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
95.4k
    _common_profile->add_info_string("IsColocate",
716
95.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
95.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
95.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
95.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
95.4k
    return Status::OK();
721
95.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
141
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
141
    _operator_profile =
664
141
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
141
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
141
    _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
141
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
141
    _operator_profile->add_child(_common_profile, true);
673
141
    _operator_profile->add_child(_custom_profile, true);
674
675
141
    _operator_profile->set_metadata(_parent->node_id());
676
141
    _wait_for_finish_dependency_timer =
677
141
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
141
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
141
    if constexpr (!is_fake_shared) {
680
141
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
141
            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
141
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
141
            _shared_state = info.shared_state->template cast<SharedState>();
696
141
            _dependency = _shared_state->create_sink_dependency(
697
141
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
141
        }
699
141
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
141
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
141
    }
702
703
141
    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
141
    _rows_input_counter =
708
141
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
141
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
141
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
141
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
141
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
141
    _memory_used_counter =
714
141
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
141
    _common_profile->add_info_string("IsColocate",
716
141
                                     std::to_string(_parent->is_colocated_operator()));
717
141
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
141
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
141
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
141
    return Status::OK();
721
141
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
543k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
543k
    _operator_profile =
664
543k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
543k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
543k
    _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
543k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
543k
    _operator_profile->add_child(_common_profile, true);
673
543k
    _operator_profile->add_child(_custom_profile, true);
674
675
543k
    _operator_profile->set_metadata(_parent->node_id());
676
543k
    _wait_for_finish_dependency_timer =
677
543k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
543k
    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
543k
    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
543k
    _rows_input_counter =
708
543k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
543k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
543k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
543k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
543k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
543k
    _memory_used_counter =
714
543k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
543k
    _common_profile->add_info_string("IsColocate",
716
543k
                                     std::to_string(_parent->is_colocated_operator()));
717
543k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
543k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
543k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
543k
    return Status::OK();
721
543k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.0k
    _operator_profile =
664
10.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.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
10.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.0k
    _operator_profile->add_child(_common_profile, true);
673
10.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.0k
    _operator_profile->set_metadata(_parent->node_id());
676
10.0k
    _wait_for_finish_dependency_timer =
677
10.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.0k
    if constexpr (!is_fake_shared) {
680
10.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.0k
            _dependency = _shared_state->create_sink_dependency(
697
10.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.0k
        }
699
10.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.0k
    }
702
703
10.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
10.0k
    _rows_input_counter =
708
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.0k
    _memory_used_counter =
714
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.0k
    _common_profile->add_info_string("IsColocate",
716
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.0k
    return Status::OK();
721
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
471
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
471
    _operator_profile =
664
471
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
471
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
471
    _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
471
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
471
    _operator_profile->add_child(_common_profile, true);
673
471
    _operator_profile->add_child(_custom_profile, true);
674
675
471
    _operator_profile->set_metadata(_parent->node_id());
676
471
    _wait_for_finish_dependency_timer =
677
471
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
471
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
471
    if constexpr (!is_fake_shared) {
680
471
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
471
            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
471
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
471
            _shared_state = info.shared_state->template cast<SharedState>();
696
471
            _dependency = _shared_state->create_sink_dependency(
697
471
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
471
        }
699
471
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
471
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
471
    }
702
703
471
    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
471
    _rows_input_counter =
708
471
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
471
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
471
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
471
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
471
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
471
    _memory_used_counter =
714
471
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
471
    _common_profile->add_info_string("IsColocate",
716
471
                                     std::to_string(_parent->is_colocated_operator()));
717
471
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
471
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
471
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
471
    return Status::OK();
721
471
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.94k
    _operator_profile =
664
2.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.94k
    _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.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.94k
    _operator_profile->add_child(_common_profile, true);
673
2.94k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.94k
    _operator_profile->set_metadata(_parent->node_id());
676
2.94k
    _wait_for_finish_dependency_timer =
677
2.94k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.94k
    if constexpr (!is_fake_shared) {
680
2.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.94k
            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.94k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.94k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.94k
            _dependency = _shared_state->create_sink_dependency(
697
2.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.94k
        }
699
2.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.94k
    }
702
703
2.94k
    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.94k
    _rows_input_counter =
708
2.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.94k
    _memory_used_counter =
714
2.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.94k
    _common_profile->add_info_string("IsColocate",
716
2.94k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.94k
    return Status::OK();
721
2.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.4k
    _operator_profile =
664
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.4k
    _operator_profile->add_child(_common_profile, true);
673
12.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.4k
    _operator_profile->set_metadata(_parent->node_id());
676
12.4k
    _wait_for_finish_dependency_timer =
677
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.4k
    if constexpr (!is_fake_shared) {
680
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.4k
            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.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.4k
            _dependency = _shared_state->create_sink_dependency(
697
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.4k
        }
699
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.4k
    }
702
703
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.4k
    _rows_input_counter =
708
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.4k
    _memory_used_counter =
714
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.4k
    _common_profile->add_info_string("IsColocate",
716
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.4k
    return Status::OK();
721
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
239k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
239k
    _operator_profile =
664
239k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
239k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
239k
    _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
239k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
239k
    _operator_profile->add_child(_common_profile, true);
673
239k
    _operator_profile->add_child(_custom_profile, true);
674
675
239k
    _operator_profile->set_metadata(_parent->node_id());
676
239k
    _wait_for_finish_dependency_timer =
677
239k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
239k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
239k
    if constexpr (!is_fake_shared) {
680
239k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
239k
            info.shared_state_map.end()) {
682
239k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
239k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
239k
            }
685
239k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
239k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
239k
                                                  ? 0
688
239k
                                                  : info.task_idx]
689
239k
                                  .get();
690
239k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
239k
        } else {
692
409
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
409
                DCHECK(false);
694
409
            }
695
409
            _shared_state = info.shared_state->template cast<SharedState>();
696
409
            _dependency = _shared_state->create_sink_dependency(
697
409
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
409
        }
699
239k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
239k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
239k
    }
702
703
239k
    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
239k
    _rows_input_counter =
708
239k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
239k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
239k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
239k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
239k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
239k
    _memory_used_counter =
714
239k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
239k
    _common_profile->add_info_string("IsColocate",
716
239k
                                     std::to_string(_parent->is_colocated_operator()));
717
239k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
239k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
239k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
239k
    return Status::OK();
721
239k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
415k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
415k
    _operator_profile =
664
415k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
415k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
415k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
415k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
415k
    _operator_profile->add_child(_common_profile, true);
673
415k
    _operator_profile->add_child(_custom_profile, true);
674
675
415k
    _operator_profile->set_metadata(_parent->node_id());
676
415k
    _wait_for_finish_dependency_timer =
677
415k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
415k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
415k
    if constexpr (!is_fake_shared) {
680
415k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
415k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
415k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
415k
            _shared_state = info.shared_state->template cast<SharedState>();
696
415k
            _dependency = _shared_state->create_sink_dependency(
697
415k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
415k
        }
699
415k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
415k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
415k
    }
702
703
415k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
415k
    _rows_input_counter =
708
415k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
415k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
415k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
415k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
415k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
415k
    _memory_used_counter =
714
415k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
415k
    _common_profile->add_info_string("IsColocate",
716
415k
                                     std::to_string(_parent->is_colocated_operator()));
717
415k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
415k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
415k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
415k
    return Status::OK();
721
415k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.84M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.84M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.84M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.30M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.30M
    }
731
1.84M
    _closed = true;
732
1.84M
    return Status::OK();
733
1.84M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
126k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
126k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
126k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
126k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
126k
    }
731
126k
    _closed = true;
732
126k
    return Status::OK();
733
126k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
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
270k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
270k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
270k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
270k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
270k
    }
731
270k
    _closed = true;
732
270k
    return Status::OK();
733
270k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
155
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
155
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
153
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
153
    }
731
153
    _closed = true;
732
153
    return Status::OK();
733
155
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.96k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.96k
    }
731
7.96k
    _closed = true;
732
7.96k
    return Status::OK();
733
7.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.58k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.58k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.58k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.58k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.58k
    }
731
9.58k
    _closed = true;
732
9.58k
    return Status::OK();
733
9.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
109k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
109k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
109k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
109k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
109k
    }
731
109k
    _closed = true;
732
109k
    return Status::OK();
733
109k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
94.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
94.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
94.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
94.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
94.9k
    }
731
94.9k
    _closed = true;
732
94.9k
    return Status::OK();
733
94.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
130
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
130
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
130
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
130
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
130
    }
731
130
    _closed = true;
732
130
    return Status::OK();
733
130
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
545k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
545k
    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
545k
    _closed = true;
732
545k
    return Status::OK();
733
545k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.0k
    }
731
10.0k
    _closed = true;
732
10.0k
    return Status::OK();
733
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
371
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
371
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
371
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
371
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
371
    }
731
371
    _closed = true;
732
371
    return Status::OK();
733
371
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
3.00k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
3.00k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
3.00k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
3.00k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
3.00k
    }
731
3.00k
    _closed = true;
732
3.00k
    return Status::OK();
733
3.00k
}
_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
240k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
240k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
240k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
240k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
240k
    }
731
240k
    _closed = true;
732
240k
    return Status::OK();
733
240k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
414k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
414k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
414k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
414k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
414k
    }
731
414k
    _closed = true;
732
414k
    return Status::OK();
733
414k
}
_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.39k
                                                          bool* eos) {
738
1.39k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.38k
    return pull(state, block, eos);
740
1.39k
}
_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.35k
                                                          bool* eos) {
738
1.35k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.34k
    return pull(state, block, eos);
740
1.35k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
436k
                                                         bool* eos) {
745
436k
    auto& local_state = get_local_state(state);
746
436k
    if (need_more_input_data(state)) {
747
402k
        local_state._child_block->clear_column_data(
748
402k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
402k
                        .num_slots());
750
402k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
402k
                state, local_state._child_block.get(), &local_state._child_eos));
752
402k
        *eos = local_state._child_eos;
753
402k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
47.4k
            return Status::OK();
755
47.4k
        }
756
354k
        {
757
354k
            SCOPED_TIMER(local_state.exec_time_counter());
758
354k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
354k
        }
760
354k
    }
761
762
389k
    if (!need_more_input_data(state)) {
763
365k
        SCOPED_TIMER(local_state.exec_time_counter());
764
365k
        bool new_eos = false;
765
365k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
365k
        if (new_eos) {
767
287k
            *eos = true;
768
287k
        } else if (!need_more_input_data(state)) {
769
25.4k
            *eos = false;
770
25.4k
        }
771
365k
    }
772
389k
    return Status::OK();
773
389k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
138k
                                                         bool* eos) {
745
138k
    auto& local_state = get_local_state(state);
746
138k
    if (need_more_input_data(state)) {
747
117k
        local_state._child_block->clear_column_data(
748
117k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
117k
                        .num_slots());
750
117k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
117k
                state, local_state._child_block.get(), &local_state._child_eos));
752
117k
        *eos = local_state._child_eos;
753
117k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
26.9k
            return Status::OK();
755
26.9k
        }
756
90.4k
        {
757
90.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
90.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
90.4k
        }
760
90.4k
    }
761
762
111k
    if (!need_more_input_data(state)) {
763
111k
        SCOPED_TIMER(local_state.exec_time_counter());
764
111k
        bool new_eos = false;
765
111k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
111k
        if (new_eos) {
767
53.8k
            *eos = true;
768
57.3k
        } else if (!need_more_input_data(state)) {
769
11.0k
            *eos = false;
770
11.0k
        }
771
111k
    }
772
111k
    return Status::OK();
773
111k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.44k
                                                         bool* eos) {
745
4.44k
    auto& local_state = get_local_state(state);
746
4.44k
    if (need_more_input_data(state)) {
747
2.55k
        local_state._child_block->clear_column_data(
748
2.55k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.55k
                        .num_slots());
750
2.55k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.55k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.55k
        *eos = local_state._child_eos;
753
2.55k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
782
            return Status::OK();
755
782
        }
756
1.77k
        {
757
1.77k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.77k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.77k
        }
760
1.77k
    }
761
762
3.67k
    if (!need_more_input_data(state)) {
763
3.67k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.67k
        bool new_eos = false;
765
3.67k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.67k
        if (new_eos) {
767
1.20k
            *eos = true;
768
2.46k
        } else if (!need_more_input_data(state)) {
769
1.89k
            *eos = false;
770
1.89k
        }
771
3.67k
    }
772
3.66k
    return Status::OK();
773
3.66k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.90k
                                                         bool* eos) {
745
1.90k
    auto& local_state = get_local_state(state);
746
1.90k
    if (need_more_input_data(state)) {
747
1.90k
        local_state._child_block->clear_column_data(
748
1.90k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.90k
                        .num_slots());
750
1.90k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.90k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.90k
        *eos = local_state._child_eos;
753
1.90k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
792
            return Status::OK();
755
792
        }
756
1.11k
        {
757
1.11k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.11k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.11k
        }
760
1.11k
    }
761
762
1.11k
    if (!need_more_input_data(state)) {
763
1.11k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.11k
        bool new_eos = false;
765
1.11k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.11k
        if (new_eos) {
767
801
            *eos = true;
768
801
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.11k
    }
772
1.11k
    return Status::OK();
773
1.11k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
18.2k
                                                         bool* eos) {
745
18.2k
    auto& local_state = get_local_state(state);
746
18.2k
    if (need_more_input_data(state)) {
747
18.2k
        local_state._child_block->clear_column_data(
748
18.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
18.2k
                        .num_slots());
750
18.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
18.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
18.2k
        *eos = local_state._child_eos;
753
18.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.66k
            return Status::OK();
755
2.66k
        }
756
15.6k
        {
757
15.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
15.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
15.6k
        }
760
15.6k
    }
761
762
15.6k
    if (!need_more_input_data(state)) {
763
9.19k
        SCOPED_TIMER(local_state.exec_time_counter());
764
9.19k
        bool new_eos = false;
765
9.19k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
9.19k
        if (new_eos) {
767
8.98k
            *eos = true;
768
8.98k
        } else if (!need_more_input_data(state)) {
769
10
            *eos = false;
770
10
        }
771
9.19k
    }
772
15.6k
    return Status::OK();
773
15.6k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
240k
                                                         bool* eos) {
745
240k
    auto& local_state = get_local_state(state);
746
241k
    if (need_more_input_data(state)) {
747
241k
        local_state._child_block->clear_column_data(
748
241k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
241k
                        .num_slots());
750
241k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
241k
                state, local_state._child_block.get(), &local_state._child_eos));
752
241k
        *eos = local_state._child_eos;
753
241k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
15.3k
            return Status::OK();
755
15.3k
        }
756
225k
        {
757
225k
            SCOPED_TIMER(local_state.exec_time_counter());
758
225k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
225k
        }
760
225k
    }
761
762
225k
    if (!need_more_input_data(state)) {
763
208k
        SCOPED_TIMER(local_state.exec_time_counter());
764
208k
        bool new_eos = false;
765
208k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
208k
        if (new_eos) {
767
207k
            *eos = true;
768
207k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
208k
    }
772
225k
    return Status::OK();
773
225k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
23.9k
                                                         bool* eos) {
745
23.9k
    auto& local_state = get_local_state(state);
746
23.9k
    if (need_more_input_data(state)) {
747
11.8k
        local_state._child_block->clear_column_data(
748
11.8k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.8k
                        .num_slots());
750
11.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.8k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.8k
        *eos = local_state._child_eos;
753
11.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
334
            return Status::OK();
755
334
        }
756
11.5k
        {
757
11.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
11.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
11.5k
        }
760
11.5k
    }
761
762
23.5k
    if (!need_more_input_data(state)) {
763
22.9k
        SCOPED_TIMER(local_state.exec_time_counter());
764
22.9k
        bool new_eos = false;
765
22.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
22.9k
        if (new_eos) {
767
7.96k
            *eos = true;
768
14.9k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
22.9k
    }
772
23.5k
    return Status::OK();
773
23.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
9.65k
                                                         bool* eos) {
745
9.65k
    auto& local_state = get_local_state(state);
746
9.65k
    if (need_more_input_data(state)) {
747
9.29k
        local_state._child_block->clear_column_data(
748
9.29k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.29k
                        .num_slots());
750
9.29k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.29k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.29k
        *eos = local_state._child_eos;
753
9.29k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
643
            return Status::OK();
755
643
        }
756
8.64k
        {
757
8.64k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.64k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.64k
        }
760
8.64k
    }
761
762
9.00k
    if (!need_more_input_data(state)) {
763
9.00k
        SCOPED_TIMER(local_state.exec_time_counter());
764
9.00k
        bool new_eos = false;
765
9.00k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
9.00k
        if (new_eos) {
767
6.52k
            *eos = true;
768
6.52k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
9.00k
    }
772
9.00k
    return Status::OK();
773
9.00k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
50.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.0k
                                                         "AsyncWriterDependency", true);
781
50.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.0k
                             _finish_dependency));
783
784
50.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.0k
    return Status::OK();
787
50.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
360
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
360
    RETURN_IF_ERROR(Base::init(state, info));
779
360
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
360
                                                         "AsyncWriterDependency", true);
781
360
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
360
                             _finish_dependency));
783
784
360
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
360
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
360
    return Status::OK();
787
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.6k
                                                         "AsyncWriterDependency", true);
781
49.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.6k
                             _finish_dependency));
783
784
49.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.6k
    return Status::OK();
787
49.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
14
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
14
    RETURN_IF_ERROR(Base::init(state, info));
779
14
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
14
                                                         "AsyncWriterDependency", true);
781
14
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
14
                             _finish_dependency));
783
784
14
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
14
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
14
    return Status::OK();
787
14
}
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
50.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.5k
    RETURN_IF_ERROR(Base::open(state));
793
50.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
389k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
339k
        RETURN_IF_ERROR(
796
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
339k
    }
798
50.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.5k
    return Status::OK();
800
50.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
360
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
360
    RETURN_IF_ERROR(Base::open(state));
793
360
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.47k
        RETURN_IF_ERROR(
796
1.47k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.47k
    }
798
360
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
360
    return Status::OK();
800
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
50.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.1k
    RETURN_IF_ERROR(Base::open(state));
793
50.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
337k
        RETURN_IF_ERROR(
796
337k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
337k
    }
798
50.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.1k
    return Status::OK();
800
50.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
14
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
14
    RETURN_IF_ERROR(Base::open(state));
793
14
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
252
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
238
        RETURN_IF_ERROR(
796
238
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
238
    }
798
14
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
14
    return Status::OK();
800
14
}
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.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
67.0k
    return _writer->sink(block, eos);
806
67.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.82k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.82k
    return _writer->sink(block, eos);
806
1.82k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
65.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.1k
    return _writer->sink(block, eos);
806
65.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
14
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
14
    return _writer->sink(block, eos);
806
14
}
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
50.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.6k
    if (_writer) {
818
50.6k
        Status st = _writer->get_writer_status();
819
50.6k
        if (exec_status.ok()) {
820
50.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.5k
                                                       : Status::Cancelled("force close"));
822
50.5k
        } else {
823
143
            _writer->force_close(exec_status);
824
143
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.6k
        RETURN_IF_ERROR(st);
829
50.6k
    }
830
50.5k
    return Base::close(state, exec_status);
831
50.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
349
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
349
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
349
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
349
    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
349
    if (_writer) {
818
349
        Status st = _writer->get_writer_status();
819
349
        if (exec_status.ok()) {
820
349
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
349
                                                       : Status::Cancelled("force close"));
822
349
        } 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
349
        RETURN_IF_ERROR(st);
829
349
    }
830
349
    return Base::close(state, exec_status);
831
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.2k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.2k
    if (_writer) {
818
50.2k
        Status st = _writer->get_writer_status();
819
50.2k
        if (exec_status.ok()) {
820
50.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.1k
                                                       : Status::Cancelled("force close"));
822
50.1k
        } else {
823
143
            _writer->force_close(exec_status);
824
143
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.2k
        RETURN_IF_ERROR(st);
829
50.2k
    }
830
50.2k
    return Base::close(state, exec_status);
831
50.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
14
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
14
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
14
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
14
    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
14
    if (_writer) {
818
14
        Status st = _writer->get_writer_status();
819
14
        if (exec_status.ok()) {
820
14
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
14
                                                       : Status::Cancelled("force close"));
822
14
        } 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
14
        RETURN_IF_ERROR(st);
829
14
    }
830
14
    return Base::close(state, exec_status);
831
14
}
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