Coverage Report

Created: 2026-11-02 13:31

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.97M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.97M
    if (_parent->nereids_id() == -1) {
123
1.04M
        return fmt::format("(id={})", _parent->node_id());
124
1.04M
    } else {
125
930k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
930k
    }
127
1.97M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
69.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
69.7k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
69.7k
    } else {
125
69.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
69.7k
    }
127
69.7k
}
_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
257k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
257k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
257k
    } else {
125
257k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
257k
    }
127
257k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
156
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
156
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
156
    } else {
125
156
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
156
    }
127
156
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.65k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.65k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.65k
    } else {
125
5.65k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.65k
    }
127
5.65k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.48k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.48k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.42k
    } else {
125
9.42k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.42k
    }
127
9.48k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
107k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
107k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
107k
    } else {
125
107k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
107k
    }
127
107k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
79.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
79.9k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
79.9k
    } else {
125
79.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
79.9k
    }
127
79.9k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
123
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
123
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
123
    } else {
125
123
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
123
    }
127
123
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
625k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
625k
    if (_parent->nereids_id() == -1) {
123
286k
        return fmt::format("(id={})", _parent->node_id());
124
339k
    } else {
125
339k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
339k
    }
127
625k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.4k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.4k
    } else {
125
56.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.4k
    }
127
56.4k
}
_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
4.73k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.73k
    if (_parent->nereids_id() == -1) {
123
4.72k
        return fmt::format("(id={})", _parent->node_id());
124
4.72k
    } else {
125
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5
    }
127
4.73k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
542
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
542
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
440
    } else {
125
440
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
440
    }
127
542
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.24k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.24k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.23k
    } else {
125
5.23k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.23k
    }
127
5.24k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
750k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
750k
    if (_parent->nereids_id() == -1) {
123
750k
        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
750k
}
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.34M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.34M
    if (_parent->nereids_id() == -1) {
132
753k
        return fmt::format("(id={})", _parent->node_id());
133
753k
    } else {
134
589k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
589k
    }
136
1.34M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
117k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
117k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
117k
    } else {
134
117k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
117k
    }
136
117k
}
_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
259k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
259k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
259k
    } else {
134
259k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
259k
    }
136
259k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
163
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
163
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
163
    } else {
134
163
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
163
    }
136
163
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.65k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.65k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.65k
    } else {
134
5.65k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.65k
    }
136
5.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.52k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.52k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.46k
    } else {
134
9.46k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.46k
    }
136
9.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
107k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
107k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
107k
    } else {
134
107k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
107k
    }
136
107k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
78.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
78.5k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
78.5k
    } else {
134
78.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
78.5k
    }
136
78.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
133
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
133
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
133
    } else {
134
133
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
133
    }
136
133
}
_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.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.1k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.1k
    } else {
134
10.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.1k
    }
136
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
543
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
543
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
441
    } else {
134
441
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
441
    }
136
543
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.9k
    if (_parent->nereids_id() == -1) {
132
12.9k
        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.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
295k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
295k
    if (_parent->nereids_id() == -1) {
132
295k
        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
295k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
444k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
444k
    if (_parent->nereids_id() == -1) {
132
444k
        return fmt::format("(id={})", _parent->node_id());
133
444k
    } else {
134
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
22
    }
136
444k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
33.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
33.4k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
33.4k
    _terminated = true;
144
33.4k
    return Status::OK();
145
33.4k
}
_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
3.58k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.58k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.58k
    _terminated = true;
144
3.58k
    return Status::OK();
145
3.58k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.57k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.57k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.57k
    _terminated = true;
144
2.57k
    return Status::OK();
145
2.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.51k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.51k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.51k
    _terminated = true;
144
1.51k
    return Status::OK();
145
1.51k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
523
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
523
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
523
    _terminated = true;
144
523
    return Status::OK();
145
523
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
528
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
528
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
528
    _terminated = true;
144
528
    return Status::OK();
145
528
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
76
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
76
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
76
    _terminated = true;
144
76
    return Status::OK();
145
76
}
_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
433
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
433
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
433
    _terminated = true;
144
433
    return Status::OK();
145
433
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
129
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
129
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
129
    _terminated = true;
144
129
    return Status::OK();
145
129
}
146
147
325k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
325k
    return _child && _child->is_serial_operator() && !is_source()
149
325k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
325k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
325k
}
152
153
23.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
23.3k
    if (!_child) {
155
22.5k
        return false;
156
22.5k
    }
157
775
    if (_child->is_serial_operator()) {
158
61
        return true;
159
61
    }
160
714
    const auto child_distribution = _child->required_data_distribution(state);
161
714
    return child_distribution.need_local_exchange() &&
162
714
           !is_shuffled_exchange(child_distribution.distribution_type);
163
775
}
164
165
template <typename SharedStateArg>
166
16.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.2k
    fmt::memory_buffer debug_string_buffer;
168
16.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.2k
    return fmt::to_string(debug_string_buffer);
170
16.2k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
_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
48
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
48
    fmt::memory_buffer debug_string_buffer;
168
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
48
    return fmt::to_string(debug_string_buffer);
170
48
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
88
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
88
    fmt::memory_buffer debug_string_buffer;
168
88
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
88
    return fmt::to_string(debug_string_buffer);
170
88
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.7k
    fmt::memory_buffer debug_string_buffer;
168
15.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.7k
    return fmt::to_string(debug_string_buffer);
170
15.7k
}
_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
326
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
326
    fmt::memory_buffer debug_string_buffer;
168
326
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
326
    return fmt::to_string(debug_string_buffer);
170
326
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.1k
    fmt::memory_buffer debug_string_buffer;
175
16.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.1k
    return fmt::to_string(debug_string_buffer);
177
16.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
48
    fmt::memory_buffer debug_string_buffer;
175
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
48
    return fmt::to_string(debug_string_buffer);
177
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
88
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
88
    fmt::memory_buffer debug_string_buffer;
175
88
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
88
    return fmt::to_string(debug_string_buffer);
177
88
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
134
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
134
    fmt::memory_buffer debug_string_buffer;
175
134
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
134
    return fmt::to_string(debug_string_buffer);
177
134
}
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
200
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
200
    fmt::memory_buffer debug_string_buffer;
175
200
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
200
    return fmt::to_string(debug_string_buffer);
177
200
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.6k
    fmt::memory_buffer debug_string_buffer;
175
15.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.6k
    return fmt::to_string(debug_string_buffer);
177
15.6k
}
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.2k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.2k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.2k
}
190
191
718k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
718k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
718k
    _nereids_id = tnode.nereids_id;
194
718k
    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
718k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
718k
    _op_name = substr + "_OPERATOR";
209
210
718k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
718k
    } else if (tnode.__isset.conjuncts) {
213
286k
        for (const auto& conjunct : tnode.conjuncts) {
214
286k
            VExprContextSPtr context;
215
286k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
286k
            _conjuncts.emplace_back(context);
217
286k
        }
218
106k
    }
219
220
    // create the projections expr
221
718k
    if (tnode.__isset.projections) {
222
277k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
277k
    }
224
718k
    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
718k
    return Status::OK();
234
718k
}
235
236
744k
Status OperatorXBase::prepare(RuntimeState* state) {
237
744k
    for (auto& conjunct : _conjuncts) {
238
285k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
285k
    }
240
744k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
694k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
349k
            return a->execute_cost() < b->execute_cost();
243
349k
        });
244
694k
    };
245
246
744k
    if (has_projection()) {
247
277k
        auto& projection = *_projection;
248
289k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
277k
        const auto& final_projection_input_row_desc =
256
277k
                projection.intermediate_output_row_descriptors.empty()
257
277k
                        ? operator_row_desc_before_projection()
258
277k
                        : projection.intermediate_output_row_descriptors.back();
259
277k
        RETURN_IF_ERROR(
260
277k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
277k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
277k
                                                      projection.output_row_descriptor));
263
277k
    }
264
265
744k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
744k
    if (has_projection()) {
269
277k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
277k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
277k
    }
274
744k
    if (_child && !is_source()) {
275
102k
        RETURN_IF_ERROR(_child->prepare(state));
276
102k
    }
277
278
744k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
744k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
744k
    return Status::OK();
284
744k
}
285
286
10.2k
Status OperatorXBase::terminate(RuntimeState* state) {
287
10.2k
    if (_child && !is_source()) {
288
860
        RETURN_IF_ERROR(_child->terminate(state));
289
860
    }
290
10.2k
    auto result = state->get_local_state_result(operator_id());
291
10.2k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
10.2k
    return result.value()->terminate(state);
295
10.2k
}
296
297
5.25M
Status OperatorXBase::close(RuntimeState* state) {
298
5.25M
    if (_child && !is_source()) {
299
805k
        RETURN_IF_ERROR(_child->close(state));
300
805k
    }
301
5.25M
    auto result = state->get_local_state_result(operator_id());
302
5.25M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.25M
    return result.value()->close(state);
306
5.25M
}
307
308
297k
void PipelineXLocalStateBase::clear_origin_block() {
309
297k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
297k
}
311
312
900k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
900k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
900k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
900k
    return Status::OK();
317
900k
}
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
297k
                                     Block* output_block) const {
326
297k
    auto* local_state = state->get_local_state(operator_id());
327
297k
    SCOPED_TIMER(local_state->exec_time_counter());
328
297k
    SCOPED_TIMER(local_state->_projection_timer);
329
297k
    const size_t rows = origin_block->rows();
330
297k
    if (rows == 0) {
331
152k
        return Status::OK();
332
152k
    }
333
145k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
145k
    {
336
145k
        Block input_block = *origin_block;
337
338
145k
        ColumnsWithTypeAndName new_columns;
339
145k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.44k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.44k
            new_columns.resize(projections.size());
345
129k
            for (int i = 0; i < projections.size(); i++) {
346
123k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
123k
                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
123k
            }
355
5.43k
            Block tmp_block {new_columns};
356
5.43k
            input_block.swap(tmp_block);
357
5.43k
        }
358
359
145k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
145k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
145k
                output_block, _projection->output_row_descriptor);
368
145k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
145k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
145k
        Columns shared_columns(mutable_columns.size());
371
372
820k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
675k
            ColumnPtr column_ptr;
374
675k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
675k
            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
675k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
675k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
675k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
435k
            } else {
388
435k
                shared_columns[i] = std::move(column_ptr);
389
435k
            }
390
675k
        }
391
392
145k
        scoped_mutable_block.restore();
393
821k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
675k
            if (shared_columns[i]) {
395
435k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
435k
            }
397
675k
        }
398
145k
    }
399
400
0
    origin_block->clear_column_data(
401
145k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
145k
    DCHECK_EQ(output_block->rows(), rows);
403
404
145k
    return Status::OK();
405
145k
}
406
407
4.50M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.50M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.50M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.50M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.50M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.50M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.50M
            if (_debug_point_count++ % 2 == 0) {
414
4.50M
                return Status::OK();
415
4.50M
            }
416
4.50M
        }
417
4.50M
    });
418
419
4.50M
    Status status;
420
4.50M
    auto* local_state = state->get_local_state(operator_id());
421
4.50M
    Defer defer([&]() {
422
4.50M
        if (status.ok()) {
423
4.50M
            local_state->update_output_block_counters(*block);
424
4.50M
        }
425
4.50M
    });
426
4.50M
    if (has_projection()) {
427
297k
        local_state->clear_origin_block();
428
297k
        status = get_block(state, &local_state->_origin_block, eos);
429
297k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
297k
        status = do_projections(state, &local_state->_origin_block, block);
433
297k
        return status;
434
297k
    }
435
4.20M
    status = get_block(state, block, eos);
436
4.20M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.20M
    return status;
438
4.20M
}
439
440
3.08M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
3.08M
    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.08M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
3.08M
        auto op_name = to_lower(_parent->_op_name);
448
3.08M
        auto arg_op_name = dp->param<std::string>("op_name");
449
3.08M
        arg_op_name = to_lower(arg_op_name);
450
451
3.08M
        if (op_name == arg_op_name) {
452
3.08M
            *eos = true;
453
3.08M
        }
454
3.08M
    });
455
456
3.08M
    if (auto rows = block->rows()) {
457
814k
        _num_rows_returned += rows;
458
814k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
814k
    }
460
3.08M
}
461
462
33.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
33.4k
    auto result = state->get_sink_local_state_result();
464
33.4k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
33.4k
    return result.value()->terminate(state);
468
33.4k
}
469
470
16.1k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.1k
    fmt::memory_buffer debug_string_buffer;
472
473
16.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.1k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.1k
    return fmt::to_string(debug_string_buffer);
476
16.1k
}
477
478
16.1k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.1k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.1k
}
481
482
368k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
368k
    std::string op_name = "UNKNOWN_SINK";
484
368k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
369k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
369k
        op_name = it->second;
488
369k
    }
489
368k
    _name = op_name + "_OPERATOR";
490
368k
    return Status::OK();
491
368k
}
492
493
319k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
319k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
319k
    _nereids_id = tnode.nereids_id;
496
319k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
319k
    _name = substr + "_SINK_OPERATOR";
498
319k
    return Status::OK();
499
319k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.91M
                                                            LocalSinkStateInfo& info) {
504
1.91M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.91M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.91M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.91M
    return Status::OK();
508
1.91M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
117k
                                                            LocalSinkStateInfo& info) {
504
117k
    auto local_state = LocalStateType::create_unique(this, state);
505
117k
    RETURN_IF_ERROR(local_state->init(state, info));
506
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
117k
    return Status::OK();
508
117k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
396k
                                                            LocalSinkStateInfo& info) {
504
396k
    auto local_state = LocalStateType::create_unique(this, state);
505
396k
    RETURN_IF_ERROR(local_state->init(state, info));
506
396k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
396k
    return Status::OK();
508
396k
}
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
363
                                                            LocalSinkStateInfo& info) {
504
363
    auto local_state = LocalStateType::create_unique(this, state);
505
363
    RETURN_IF_ERROR(local_state->init(state, info));
506
363
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
363
    return Status::OK();
508
363
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
50.3k
                                                            LocalSinkStateInfo& info) {
504
50.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
50.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
50.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
50.3k
    return Status::OK();
508
50.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
36
                                                            LocalSinkStateInfo& info) {
504
36
    auto local_state = LocalStateType::create_unique(this, state);
505
36
    RETURN_IF_ERROR(local_state->init(state, info));
506
36
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
36
    return Status::OK();
508
36
}
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.46k
                                                            LocalSinkStateInfo& info) {
504
9.46k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.46k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.46k
    return Status::OK();
508
9.46k
}
_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
259k
                                                            LocalSinkStateInfo& info) {
504
259k
    auto local_state = LocalStateType::create_unique(this, state);
505
259k
    RETURN_IF_ERROR(local_state->init(state, info));
506
259k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
259k
    return Status::OK();
508
259k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
163
                                                            LocalSinkStateInfo& info) {
504
163
    auto local_state = LocalStateType::create_unique(this, state);
505
163
    RETURN_IF_ERROR(local_state->init(state, info));
506
163
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
163
    return Status::OK();
508
163
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
295k
                                                            LocalSinkStateInfo& info) {
504
295k
    auto local_state = LocalStateType::create_unique(this, state);
505
295k
    RETURN_IF_ERROR(local_state->init(state, info));
506
295k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
295k
    return Status::OK();
508
295k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
107k
                                                            LocalSinkStateInfo& info) {
504
107k
    auto local_state = LocalStateType::create_unique(this, state);
505
107k
    RETURN_IF_ERROR(local_state->init(state, info));
506
107k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107k
    return Status::OK();
508
107k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
78.2k
                                                            LocalSinkStateInfo& info) {
504
78.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
78.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
78.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
78.2k
    return Status::OK();
508
78.2k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
133
                                                            LocalSinkStateInfo& info) {
504
133
    auto local_state = LocalStateType::create_unique(this, state);
505
133
    RETURN_IF_ERROR(local_state->init(state, info));
506
133
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
133
    return Status::OK();
508
133
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
567k
                                                            LocalSinkStateInfo& info) {
504
567k
    auto local_state = LocalStateType::create_unique(this, state);
505
567k
    RETURN_IF_ERROR(local_state->init(state, info));
506
567k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
567k
    return Status::OK();
508
567k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.66k
                                                            LocalSinkStateInfo& info) {
504
5.66k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.66k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.66k
    return Status::OK();
508
5.66k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.1k
                                                            LocalSinkStateInfo& info) {
504
10.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.1k
    return Status::OK();
508
10.1k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.92k
                                                            LocalSinkStateInfo& info) {
504
1.92k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.92k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.92k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.92k
    return Status::OK();
508
1.92k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
438
                                                            LocalSinkStateInfo& info) {
504
438
    auto local_state = LocalStateType::create_unique(this, state);
505
438
    RETURN_IF_ERROR(local_state->init(state, info));
506
438
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
438
    return Status::OK();
508
438
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.88k
                                                            LocalSinkStateInfo& info) {
504
4.88k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.88k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.88k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.88k
    return Status::OK();
508
4.88k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.71k
                                                            LocalSinkStateInfo& info) {
504
2.71k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.71k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.71k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.71k
    return Status::OK();
508
2.71k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.68k
                                                            LocalSinkStateInfo& info) {
504
2.68k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.68k
    return Status::OK();
508
2.68k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.61k
                                                            LocalSinkStateInfo& info) {
504
2.61k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.61k
    return Status::OK();
508
2.61k
}
_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
564
                                                            LocalSinkStateInfo& info) {
504
564
    auto local_state = LocalStateType::create_unique(this, state);
505
564
    RETURN_IF_ERROR(local_state->init(state, info));
506
564
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
564
    return Status::OK();
508
564
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.50M
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.50M
    } else {
519
1.50M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.50M
        ss->id = operator_id();
521
1.50M
        for (auto& dest : dests_id()) {
522
1.50M
            ss->related_op_ids.insert(dest);
523
1.50M
        }
524
1.50M
        return ss;
525
1.50M
    }
526
1.50M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
101k
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
101k
    } else {
519
101k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
101k
        ss->id = operator_id();
521
101k
        for (auto& dest : dests_id()) {
522
101k
            ss->related_op_ids.insert(dest);
523
101k
        }
524
101k
        return ss;
525
101k
    }
526
101k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
397k
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
397k
    } else {
519
397k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
397k
        ss->id = operator_id();
521
397k
        for (auto& dest : dests_id()) {
522
395k
            ss->related_op_ids.insert(dest);
523
395k
        }
524
397k
        return ss;
525
397k
    }
526
397k
}
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
363
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
363
    } else {
519
363
        auto ss = LocalStateType::SharedStateType::create_shared();
520
363
        ss->id = operator_id();
521
363
        for (auto& dest : dests_id()) {
522
361
            ss->related_op_ids.insert(dest);
523
361
        }
524
363
        return ss;
525
363
    }
526
363
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.4k
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.4k
    } else {
519
50.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.4k
        ss->id = operator_id();
521
50.4k
        for (auto& dest : dests_id()) {
522
50.2k
            ss->related_op_ids.insert(dest);
523
50.2k
        }
524
50.4k
        return ss;
525
50.4k
    }
526
50.4k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
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
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
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.54k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.54k
    } else {
519
9.54k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.54k
        ss->id = operator_id();
521
9.54k
        for (auto& dest : dests_id()) {
522
9.52k
            ss->related_op_ids.insert(dest);
523
9.52k
        }
524
9.54k
        return ss;
525
9.54k
    }
526
9.54k
}
_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
260k
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
260k
    } else {
519
260k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
260k
        ss->id = operator_id();
521
260k
        for (auto& dest : dests_id()) {
522
260k
            ss->related_op_ids.insert(dest);
523
260k
        }
524
260k
        return ss;
525
260k
    }
526
260k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
165
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
165
    } else {
519
165
        auto ss = LocalStateType::SharedStateType::create_shared();
520
165
        ss->id = operator_id();
521
165
        for (auto& dest : dests_id()) {
522
165
            ss->related_op_ids.insert(dest);
523
165
        }
524
165
        return ss;
525
165
    }
526
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
108k
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
108k
    } else {
519
108k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
108k
        ss->id = operator_id();
521
108k
        for (auto& dest : dests_id()) {
522
108k
            ss->related_op_ids.insert(dest);
523
108k
        }
524
108k
        return ss;
525
108k
    }
526
108k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
132
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
132
    } else {
519
132
        auto ss = LocalStateType::SharedStateType::create_shared();
520
132
        ss->id = operator_id();
521
132
        for (auto& dest : dests_id()) {
522
132
            ss->related_op_ids.insert(dest);
523
132
        }
524
132
        return ss;
525
132
    }
526
132
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
568k
    } else {
519
568k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568k
        ss->id = operator_id();
521
568k
        for (auto& dest : dests_id()) {
522
564k
            ss->related_op_ids.insert(dest);
523
564k
        }
524
568k
        return ss;
525
568k
    }
526
568k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.66k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.66k
    } else {
519
5.66k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.66k
        ss->id = operator_id();
521
5.66k
        for (auto& dest : dests_id()) {
522
5.65k
            ss->related_op_ids.insert(dest);
523
5.65k
        }
524
5.66k
        return ss;
525
5.66k
    }
526
5.66k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
542
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
542
    } else {
519
542
        auto ss = LocalStateType::SharedStateType::create_shared();
520
542
        ss->id = operator_id();
521
542
        for (auto& dest : dests_id()) {
522
540
            ss->related_op_ids.insert(dest);
523
540
        }
524
542
        return ss;
525
542
    }
526
542
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.69k
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.69k
    } else {
519
2.69k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.69k
        ss->id = operator_id();
521
2.69k
        for (auto& dest : dests_id()) {
522
2.69k
            ss->related_op_ids.insert(dest);
523
2.69k
        }
524
2.69k
        return ss;
525
2.69k
    }
526
2.69k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.62k
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.62k
    } else {
519
2.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.62k
        ss->id = operator_id();
521
2.62k
        for (auto& dest : dests_id()) {
522
2.62k
            ss->related_op_ids.insert(dest);
523
2.62k
        }
524
2.62k
        return ss;
525
2.62k
    }
526
2.62k
}
_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
566
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
566
    } else {
519
566
        auto ss = LocalStateType::SharedStateType::create_shared();
520
566
        ss->id = operator_id();
521
566
        for (auto& dest : dests_id()) {
522
564
            ss->related_op_ids.insert(dest);
523
564
        }
524
566
        return ss;
525
566
    }
526
566
}
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.24M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.24M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.24M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.24M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.24M
    return Status::OK();
534
2.24M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
69.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
69.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
69.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
69.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
69.8k
    return Status::OK();
534
69.8k
}
_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
130
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
130
    auto local_state = LocalStateType::create_unique(state, this);
531
130
    RETURN_IF_ERROR(local_state->init(state, info));
532
130
    state->emplace_local_state(operator_id(), std::move(local_state));
533
130
    return Status::OK();
534
130
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.38k
    return Status::OK();
534
3.38k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.44k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.44k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.44k
    return Status::OK();
534
9.44k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.77k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.77k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.77k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.77k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.77k
    return Status::OK();
534
8.77k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
156
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
156
    auto local_state = LocalStateType::create_unique(state, this);
531
156
    RETURN_IF_ERROR(local_state->init(state, info));
532
156
    state->emplace_local_state(operator_id(), std::move(local_state));
533
156
    return Status::OK();
534
156
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
249k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
249k
    auto local_state = LocalStateType::create_unique(state, this);
531
249k
    RETURN_IF_ERROR(local_state->init(state, info));
532
249k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
249k
    return Status::OK();
534
249k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
107k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
107k
    auto local_state = LocalStateType::create_unique(state, this);
531
107k
    RETURN_IF_ERROR(local_state->init(state, info));
532
107k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
107k
    return Status::OK();
534
107k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
80.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
80.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
80.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
80.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
80.0k
    return Status::OK();
534
80.0k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
123
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
123
    auto local_state = LocalStateType::create_unique(state, this);
531
123
    RETURN_IF_ERROR(local_state->init(state, info));
532
123
    state->emplace_local_state(operator_id(), std::move(local_state));
533
123
    return Status::OK();
534
123
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.41k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.41k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.41k
    return Status::OK();
534
6.41k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
287k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
287k
    auto local_state = LocalStateType::create_unique(state, this);
531
287k
    RETURN_IF_ERROR(local_state->init(state, info));
532
287k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
287k
    return Status::OK();
534
287k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.34k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.34k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.34k
    return Status::OK();
534
1.34k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.66k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.66k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.66k
    return Status::OK();
534
5.66k
}
_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.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.59k
    return Status::OK();
534
1.59k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.4k
    return Status::OK();
534
56.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.74k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.74k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.74k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.74k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.74k
    return Status::OK();
534
4.74k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
441
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
441
    auto local_state = LocalStateType::create_unique(state, this);
531
441
    RETURN_IF_ERROR(local_state->init(state, info));
532
441
    state->emplace_local_state(operator_id(), std::move(local_state));
533
441
    return Status::OK();
534
441
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.68k
    return Status::OK();
534
2.68k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.60k
    return Status::OK();
534
2.60k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.9k
    return Status::OK();
534
10.9k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
753k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
753k
    auto local_state = LocalStateType::create_unique(state, this);
531
753k
    RETURN_IF_ERROR(local_state->init(state, info));
532
753k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
753k
    return Status::OK();
534
753k
}
_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
801
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
801
    auto local_state = LocalStateType::create_unique(state, this);
531
801
    RETURN_IF_ERROR(local_state->init(state, info));
532
801
    state->emplace_local_state(operator_id(), std::move(local_state));
533
801
    return Status::OK();
534
801
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
876
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
876
    auto local_state = LocalStateType::create_unique(state, this);
531
876
    RETURN_IF_ERROR(local_state->init(state, info));
532
876
    state->emplace_local_state(operator_id(), std::move(local_state));
533
876
    return Status::OK();
534
876
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.32k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.32k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.32k
    return Status::OK();
534
8.32k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
306k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
306k
    auto local_state = LocalStateType::create_unique(state, this);
531
306k
    RETURN_IF_ERROR(local_state->init(state, info));
532
306k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
306k
    return Status::OK();
534
306k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.90M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.23M
        : _num_rows_returned(0),
542
2.23M
          _rows_returned_counter(nullptr),
543
2.23M
          _parent(parent),
544
2.23M
          _state(state),
545
2.23M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.25M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.25M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.25M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.25M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.25M
    _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.25M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.25M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.25M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.25M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.25M
    if constexpr (!is_fake_shared) {
560
1.36M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
843k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
843k
                                    .first.get()
563
843k
                                    ->template cast<SharedStateArg>();
564
565
843k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
843k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
843k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
843k
        } else if (info.shared_state) {
569
440k
            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
440k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
440k
            _dependency = _shared_state->create_source_dependency(
576
440k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
440k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
440k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
440k
        } else {
580
77.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
13.2k
                DCHECK(false);
582
13.2k
            }
583
77.6k
        }
584
1.36M
    }
585
586
2.25M
    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.25M
    _rows_returned_counter =
591
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.25M
    _blocks_returned_counter =
593
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.25M
    _output_block_bytes_counter =
595
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.25M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.25M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.25M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.25M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.25M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.25M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.25M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.25M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.25M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.25M
    _memory_used_counter =
606
2.25M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.25M
    _common_profile->add_info_string("IsColocate",
608
2.25M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.25M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.25M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.25M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.25M
    return Status::OK();
613
2.25M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
70.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
70.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
70.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
70.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
70.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
70.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
70.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
70.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
70.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
70.0k
    if constexpr (!is_fake_shared) {
560
70.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.2k
                                    .first.get()
563
16.2k
                                    ->template cast<SharedStateArg>();
564
565
16.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
53.7k
        } 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
52.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
52.8k
            _dependency = _shared_state->create_source_dependency(
576
52.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
52.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
52.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
940
        }
584
70.0k
    }
585
586
70.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
70.0k
    _rows_returned_counter =
591
70.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
70.0k
    _blocks_returned_counter =
593
70.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
70.0k
    _output_block_bytes_counter =
595
70.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
70.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
70.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
70.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
70.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
70.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
70.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
70.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
70.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
70.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
70.0k
    _memory_used_counter =
606
70.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
70.0k
    _common_profile->add_info_string("IsColocate",
608
70.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
70.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
70.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
70.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
70.0k
    return Status::OK();
613
70.0k
}
_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
260k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
260k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
260k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
260k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
260k
    _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
260k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
260k
    _operator_profile->add_child(_common_profile.get(), true);
557
260k
    _operator_profile->add_child(_custom_profile.get(), true);
558
260k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
260k
    if constexpr (!is_fake_shared) {
560
260k
        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
260k
        } 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
251k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
251k
            _dependency = _shared_state->create_source_dependency(
576
251k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
251k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
251k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
251k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.30k
        }
584
260k
    }
585
586
260k
    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
260k
    _rows_returned_counter =
591
260k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
260k
    _blocks_returned_counter =
593
260k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
260k
    _output_block_bytes_counter =
595
260k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
260k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
260k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
260k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
260k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
260k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
260k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
260k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
260k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
260k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
260k
    _memory_used_counter =
606
260k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
260k
    _common_profile->add_info_string("IsColocate",
608
260k
                                     std::to_string(_parent->is_colocated_operator()));
609
260k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
260k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
260k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
260k
    return Status::OK();
613
260k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
156
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
156
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
156
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
156
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
156
    _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
156
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
156
    _operator_profile->add_child(_common_profile.get(), true);
557
156
    _operator_profile->add_child(_custom_profile.get(), true);
558
156
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
156
    if constexpr (!is_fake_shared) {
560
156
        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
156
        } 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
156
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
156
            _dependency = _shared_state->create_source_dependency(
576
156
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
156
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
156
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
156
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
156
    }
585
586
156
    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
156
    _rows_returned_counter =
591
156
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
156
    _blocks_returned_counter =
593
156
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
156
    _output_block_bytes_counter =
595
156
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
156
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
156
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
156
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
156
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
156
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
156
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
156
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
156
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
156
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
156
    _memory_used_counter =
606
156
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
156
    _common_profile->add_info_string("IsColocate",
608
156
                                     std::to_string(_parent->is_colocated_operator()));
609
156
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
156
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
156
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
156
    return Status::OK();
613
156
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.66k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.66k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.66k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.66k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.66k
    _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.66k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.66k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.66k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.66k
    if constexpr (!is_fake_shared) {
560
5.66k
        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.66k
        } 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.64k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.64k
            _dependency = _shared_state->create_source_dependency(
576
5.64k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.64k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.64k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.64k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
15
        }
584
5.66k
    }
585
586
5.66k
    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.66k
    _rows_returned_counter =
591
5.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.66k
    _blocks_returned_counter =
593
5.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.66k
    _output_block_bytes_counter =
595
5.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.66k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.66k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.66k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.66k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.66k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.66k
    _memory_used_counter =
606
5.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.66k
    _common_profile->add_info_string("IsColocate",
608
5.66k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.66k
    return Status::OK();
613
5.66k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.53k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.53k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.53k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.53k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.53k
    _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.53k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.53k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.53k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.53k
    if constexpr (!is_fake_shared) {
560
9.53k
        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.53k
        } 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.43k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.43k
            _dependency = _shared_state->create_source_dependency(
576
9.43k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.43k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.43k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.43k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
104
        }
584
9.53k
    }
585
586
9.53k
    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.53k
    _rows_returned_counter =
591
9.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.53k
    _blocks_returned_counter =
593
9.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.53k
    _output_block_bytes_counter =
595
9.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.53k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.53k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.53k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.53k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.53k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.53k
    _memory_used_counter =
606
9.53k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.53k
    _common_profile->add_info_string("IsColocate",
608
9.53k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.53k
    return Status::OK();
613
9.53k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
108k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
108k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
108k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
108k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
108k
    _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
108k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
108k
    _operator_profile->add_child(_common_profile.get(), true);
557
108k
    _operator_profile->add_child(_custom_profile.get(), true);
558
108k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
108k
    if constexpr (!is_fake_shared) {
560
108k
        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
108k
        } 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
105k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
105k
            _dependency = _shared_state->create_source_dependency(
576
105k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
105k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
105k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
105k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.38k
        }
584
108k
    }
585
586
108k
    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
108k
    _rows_returned_counter =
591
108k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
108k
    _blocks_returned_counter =
593
108k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
108k
    _output_block_bytes_counter =
595
108k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
108k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
108k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
108k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
108k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
108k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
108k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
108k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
108k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
108k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
108k
    _memory_used_counter =
606
108k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
108k
    _common_profile->add_info_string("IsColocate",
608
108k
                                     std::to_string(_parent->is_colocated_operator()));
609
108k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
108k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
108k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
108k
    return Status::OK();
613
108k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
80.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
80.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
80.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
80.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
80.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
80.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
80.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
80.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
80.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
80.0k
    if constexpr (!is_fake_shared) {
560
80.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
79.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
79.7k
                                    .first.get()
563
79.7k
                                    ->template cast<SharedStateArg>();
564
565
79.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
79.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
79.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
79.7k
        } 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
268
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
268
        }
584
80.0k
    }
585
586
80.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
80.0k
    _rows_returned_counter =
591
80.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
80.0k
    _blocks_returned_counter =
593
80.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
80.0k
    _output_block_bytes_counter =
595
80.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
80.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
80.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
80.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
80.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
80.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
80.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
80.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
80.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
80.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
80.0k
    _memory_used_counter =
606
80.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
80.0k
    _common_profile->add_info_string("IsColocate",
608
80.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
80.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
80.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
80.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
80.0k
    return Status::OK();
613
80.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
123
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
123
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
123
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
123
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
123
    _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
123
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
123
    _operator_profile->add_child(_common_profile.get(), true);
557
123
    _operator_profile->add_child(_custom_profile.get(), true);
558
123
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
123
    if constexpr (!is_fake_shared) {
560
123
        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
123
        } 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
123
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
123
            _dependency = _shared_state->create_source_dependency(
576
123
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
123
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
123
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
123
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
123
    }
585
586
123
    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
123
    _rows_returned_counter =
591
123
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
123
    _blocks_returned_counter =
593
123
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
123
    _output_block_bytes_counter =
595
123
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
123
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
123
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
123
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
123
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
123
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
123
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
123
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
123
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
123
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
123
    _memory_used_counter =
606
123
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
123
    _common_profile->add_info_string("IsColocate",
608
123
                                     std::to_string(_parent->is_colocated_operator()));
609
123
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
123
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
123
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
123
    return Status::OK();
613
123
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
890k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
890k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
890k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
890k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
890k
    _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
890k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
890k
    _operator_profile->add_child(_common_profile.get(), true);
557
890k
    _operator_profile->add_child(_custom_profile.get(), true);
558
890k
    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
890k
    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
890k
    _rows_returned_counter =
591
890k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
890k
    _blocks_returned_counter =
593
890k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
890k
    _output_block_bytes_counter =
595
890k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
890k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
890k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
890k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
890k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
890k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
890k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
890k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
890k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
890k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
890k
    _memory_used_counter =
606
890k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
890k
    _common_profile->add_info_string("IsColocate",
608
890k
                                     std::to_string(_parent->is_colocated_operator()));
609
890k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
890k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
890k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
890k
    return Status::OK();
613
890k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.4k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.4k
    if constexpr (!is_fake_shared) {
560
56.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.27k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.27k
            _dependency = _shared_state->create_source_dependency(
576
4.27k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.27k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.27k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
52.1k
        }
584
56.4k
    }
585
586
56.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.4k
    _rows_returned_counter =
591
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.4k
    _blocks_returned_counter =
593
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.4k
    _output_block_bytes_counter =
595
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.4k
    _memory_used_counter =
606
56.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.4k
    _common_profile->add_info_string("IsColocate",
608
56.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.4k
    return Status::OK();
613
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.76k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.76k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.76k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.76k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.76k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.76k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.76k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.76k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.76k
    if constexpr (!is_fake_shared) {
560
4.76k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.76k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.70k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.70k
            _dependency = _shared_state->create_source_dependency(
576
4.70k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.70k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.70k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.70k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
57
        }
584
4.76k
    }
585
586
4.76k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.76k
    _rows_returned_counter =
591
4.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.76k
    _blocks_returned_counter =
593
4.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.76k
    _output_block_bytes_counter =
595
4.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.76k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.76k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.76k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.76k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.76k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.76k
    _memory_used_counter =
606
4.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.76k
    _common_profile->add_info_string("IsColocate",
608
4.76k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.76k
    return Status::OK();
613
4.76k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
543
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
543
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
543
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
543
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
543
    _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
543
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
543
    _operator_profile->add_child(_common_profile.get(), true);
557
543
    _operator_profile->add_child(_custom_profile.get(), true);
558
543
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
543
    if constexpr (!is_fake_shared) {
560
543
        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
543
        } 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
541
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
541
            _dependency = _shared_state->create_source_dependency(
576
541
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
541
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
541
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
541
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
543
    }
585
586
543
    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
543
    _rows_returned_counter =
591
543
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
543
    _blocks_returned_counter =
593
543
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
543
    _output_block_bytes_counter =
595
543
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
543
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
543
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
543
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
543
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
543
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
543
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
543
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
543
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
543
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
543
    _memory_used_counter =
606
543
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
543
    _common_profile->add_info_string("IsColocate",
608
543
                                     std::to_string(_parent->is_colocated_operator()));
609
543
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
543
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
543
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
543
    return Status::OK();
613
543
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.33k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.33k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.33k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.33k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.33k
    _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.33k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.33k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.33k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.33k
    if constexpr (!is_fake_shared) {
560
5.33k
        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.33k
        } 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.15k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.15k
            _dependency = _shared_state->create_source_dependency(
576
5.15k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.15k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.15k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.15k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
182
        }
584
5.33k
    }
585
586
5.33k
    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.33k
    _rows_returned_counter =
591
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.33k
    _blocks_returned_counter =
593
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.33k
    _output_block_bytes_counter =
595
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.33k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.33k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.33k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.33k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.33k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.33k
    _memory_used_counter =
606
5.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.33k
    _common_profile->add_info_string("IsColocate",
608
5.33k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.33k
    return Status::OK();
613
5.33k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
760k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
760k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
760k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
760k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
760k
    _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
760k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
760k
    _operator_profile->add_child(_common_profile.get(), true);
557
760k
    _operator_profile->add_child(_custom_profile.get(), true);
558
760k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
760k
    if constexpr (!is_fake_shared) {
560
760k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
747k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
747k
                                    .first.get()
563
747k
                                    ->template cast<SharedStateArg>();
564
565
747k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
747k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
747k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
747k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
13.2k
        } else {
580
13.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
13.2k
                DCHECK(false);
582
13.2k
            }
583
13.2k
        }
584
760k
    }
585
586
760k
    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
760k
    _rows_returned_counter =
591
760k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
760k
    _blocks_returned_counter =
593
760k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
760k
    _output_block_bytes_counter =
595
760k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
760k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
760k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
760k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
760k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
760k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
760k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
760k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
760k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
760k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
760k
    _memory_used_counter =
606
760k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
760k
    _common_profile->add_info_string("IsColocate",
608
760k
                                     std::to_string(_parent->is_colocated_operator()));
609
760k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
760k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
760k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
760k
    return Status::OK();
613
760k
}
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.26M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.26M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.58M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
317k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
317k
    }
621
2.26M
    if (_parent->has_projection()) {
622
404k
        const auto& projection = *_parent->_projection;
623
404k
        _projections.resize(projection.projections.size());
624
2.48M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.08M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.08M
        }
627
404k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
430k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
26.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
445k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
419k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
419k
                        state, _intermediate_projections[i][j]));
633
419k
            }
634
26.0k
        }
635
404k
    }
636
2.26M
    return Status::OK();
637
2.26M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
70.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
70.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.86k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.86k
    }
621
70.2k
    if (_parent->has_projection()) {
622
70.2k
        const auto& projection = *_parent->_projection;
623
70.2k
        _projections.resize(projection.projections.size());
624
381k
        for (size_t i = 0; i < _projections.size(); i++) {
625
311k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
311k
        }
627
70.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
82.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
360k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
348k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
348k
                        state, _intermediate_projections[i][j]));
633
348k
            }
634
11.8k
        }
635
70.2k
    }
636
70.2k
    return Status::OK();
637
70.2k
}
_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
261k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
261k
    _conjuncts.resize(_parent->_conjuncts.size());
618
261k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
261k
    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
261k
    return Status::OK();
637
261k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
153
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
153
    _conjuncts.resize(_parent->_conjuncts.size());
618
153
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
153
    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
153
    return Status::OK();
637
153
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.66k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.66k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.73k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
73
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
73
    }
621
5.66k
    if (_parent->has_projection()) {
622
5.66k
        const auto& projection = *_parent->_projection;
623
5.66k
        _projections.resize(projection.projections.size());
624
22.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
17.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
17.0k
        }
627
5.66k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.71k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
45
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
319
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
274
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
274
                        state, _intermediate_projections[i][j]));
633
274
            }
634
45
        }
635
5.66k
    }
636
5.66k
    return Status::OK();
637
5.66k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.56k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.56k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
910
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
910
    }
621
9.56k
    if (_parent->has_projection()) {
622
5.16k
        const auto& projection = *_parent->_projection;
623
5.16k
        _projections.resize(projection.projections.size());
624
21.1k
        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.16k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.25k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
89
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
674
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
585
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
585
                        state, _intermediate_projections[i][j]));
633
585
            }
634
89
        }
635
5.16k
    }
636
9.56k
    return Status::OK();
637
9.56k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
108k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
108k
    _conjuncts.resize(_parent->_conjuncts.size());
618
109k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.31k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.31k
    }
621
108k
    if (_parent->has_projection()) {
622
33.4k
        const auto& projection = *_parent->_projection;
623
33.4k
        _projections.resize(projection.projections.size());
624
300k
        for (size_t i = 0; i < _projections.size(); i++) {
625
266k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
266k
        }
627
33.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
34.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
732
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.60k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.87k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.87k
                        state, _intermediate_projections[i][j]));
633
3.87k
            }
634
732
        }
635
33.4k
    }
636
108k
    return Status::OK();
637
108k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
79.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
79.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
79.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
29
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
29
    }
621
79.9k
    if (_parent->has_projection()) {
622
320
        const auto& projection = *_parent->_projection;
623
320
        _projections.resize(projection.projections.size());
624
1.37k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.05k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.05k
        }
627
320
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
321
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
320
    }
636
79.9k
    return Status::OK();
637
79.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
127
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
127
    _conjuncts.resize(_parent->_conjuncts.size());
618
127
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
127
    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
127
    return Status::OK();
637
127
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
895k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
895k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.20M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
313k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
313k
    }
621
895k
    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.36M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.36M
        }
627
276k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
290k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
13.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
75.8k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
62.6k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
62.6k
                        state, _intermediate_projections[i][j]));
633
62.6k
            }
634
13.2k
        }
635
276k
    }
636
895k
    return Status::OK();
637
895k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.5k
    if (_parent->has_projection()) {
622
12.2k
        const auto& projection = *_parent->_projection;
623
12.2k
        _projections.resize(projection.projections.size());
624
117k
        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.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
145
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.20k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.05k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.05k
                        state, _intermediate_projections[i][j]));
633
3.05k
            }
634
145
        }
635
12.2k
    }
636
56.5k
    return Status::OK();
637
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.75k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.75k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.08k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
333
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
333
    }
621
4.75k
    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
4.75k
    return Status::OK();
637
4.75k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
543
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
543
    _conjuncts.resize(_parent->_conjuncts.size());
618
543
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
543
    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
543
    return Status::OK();
637
543
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.36k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.36k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.36k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.36k
    if (_parent->has_projection()) {
622
148
        const auto& projection = *_parent->_projection;
623
148
        _projections.resize(projection.projections.size());
624
404
        for (size_t i = 0; i < _projections.size(); i++) {
625
256
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
256
        }
627
148
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
148
        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
148
    }
636
5.36k
    return Status::OK();
637
5.36k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
763k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
763k
    _conjuncts.resize(_parent->_conjuncts.size());
618
763k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
763k
    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
763k
    return Status::OK();
637
763k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
10.2k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10.2k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10.2k
    _terminated = true;
645
10.2k
    return Status::OK();
646
10.2k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
512
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
512
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
512
    _terminated = true;
645
512
    return Status::OK();
646
512
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
30
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
30
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
30
    _terminated = true;
645
30
    return Status::OK();
646
30
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
22
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
22
    _terminated = true;
645
22
    return Status::OK();
646
22
}
_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
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.94k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.94k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.94k
    _terminated = true;
645
7.94k
    return Status::OK();
646
7.94k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
64
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
64
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
64
    _terminated = true;
645
64
    return Status::OK();
646
64
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
230
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
230
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
230
    _terminated = true;
645
230
    return Status::OK();
646
230
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.39k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.39k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.39k
    _terminated = true;
645
1.39k
    return Status::OK();
646
1.39k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
647
648
template <typename SharedStateArg>
649
2.54M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.54M
    if (_closed) {
651
283k
        return Status::OK();
652
283k
    }
653
2.25M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.36M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.36M
    }
656
2.25M
    _closed = true;
657
2.25M
    return Status::OK();
658
2.54M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.1k
    }
656
70.1k
    _closed = true;
657
70.1k
    return Status::OK();
658
70.1k
}
_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
516k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
516k
    if (_closed) {
651
259k
        return Status::OK();
652
259k
    }
653
257k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
257k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
257k
    }
656
257k
    _closed = true;
657
257k
    return Status::OK();
658
516k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
156
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
156
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
156
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
156
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
156
    }
656
156
    _closed = true;
657
156
    return Status::OK();
658
156
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.66k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.66k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.66k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.66k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.66k
    }
656
5.66k
    _closed = true;
657
5.66k
    return Status::OK();
658
5.66k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.49k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.49k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.49k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.49k
    }
656
9.49k
    _closed = true;
657
9.49k
    return Status::OK();
658
9.49k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
108k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
108k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
108k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
108k
    }
656
108k
    _closed = true;
657
108k
    return Status::OK();
658
108k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
79.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
79.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
79.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
79.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
79.3k
    }
656
79.3k
    _closed = true;
657
79.3k
    return Status::OK();
658
79.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
122
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
122
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
122
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
122
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
122
    }
656
122
    _closed = true;
657
122
    return Status::OK();
658
122
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
914k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
914k
    if (_closed) {
651
17.8k
        return Status::OK();
652
17.8k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
896k
    _closed = true;
657
896k
    return Status::OK();
658
914k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.5k
    }
656
56.5k
    _closed = true;
657
56.5k
    return Status::OK();
658
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.74k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.74k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.74k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.74k
    }
656
4.74k
    _closed = true;
657
4.74k
    return Status::OK();
658
4.74k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
878
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
878
    if (_closed) {
651
440
        return Status::OK();
652
440
    }
653
438
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
438
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
438
    }
656
438
    _closed = true;
657
438
    return Status::OK();
658
878
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.9k
    if (_closed) {
651
5.62k
        return Status::OK();
652
5.62k
    }
653
5.35k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.35k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.35k
    }
656
5.35k
    _closed = true;
657
5.35k
    return Status::OK();
658
10.9k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
765k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
765k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
765k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
765k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
765k
    }
656
765k
    _closed = true;
657
765k
    return Status::OK();
658
765k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
338
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
338
    if (_closed) {
651
178
        return Status::OK();
652
178
    }
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
338
}
659
660
template <typename SharedState>
661
1.92M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.92M
    _operator_profile =
664
1.92M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.92M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.92M
    _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.92M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.92M
    _operator_profile->add_child(_common_profile, true);
673
1.92M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.92M
    _operator_profile->set_metadata(_parent->node_id());
676
1.92M
    _wait_for_finish_dependency_timer =
677
1.92M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.92M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.92M
    if constexpr (!is_fake_shared) {
680
1.35M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.35M
            info.shared_state_map.end()) {
682
392k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
296k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
296k
            }
685
392k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
392k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
392k
                                                  ? 0
688
392k
                                                  : info.task_idx]
689
392k
                                  .get();
690
392k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
958k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
958k
            _shared_state = info.shared_state->template cast<SharedState>();
696
958k
            _dependency = _shared_state->create_sink_dependency(
697
958k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
958k
        }
699
1.35M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.35M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.35M
    }
702
703
1.92M
    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.92M
    _rows_input_counter =
708
1.92M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.92M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.92M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.92M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.92M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.92M
    _memory_used_counter =
714
1.92M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.92M
    _common_profile->add_info_string("IsColocate",
716
1.92M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.92M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.92M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.92M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.92M
    return Status::OK();
721
1.92M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118k
    _operator_profile =
664
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118k
    _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
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118k
    _operator_profile->add_child(_common_profile, true);
673
118k
    _operator_profile->add_child(_custom_profile, true);
674
675
118k
    _operator_profile->set_metadata(_parent->node_id());
676
118k
    _wait_for_finish_dependency_timer =
677
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118k
    if constexpr (!is_fake_shared) {
680
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118k
            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
16.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
16.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
16.6k
                                                  ? 0
688
16.6k
                                                  : info.task_idx]
689
16.6k
                                  .get();
690
16.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
101k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
101k
            _shared_state = info.shared_state->template cast<SharedState>();
696
101k
            _dependency = _shared_state->create_sink_dependency(
697
101k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
101k
        }
699
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118k
    }
702
703
118k
    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
118k
    _rows_input_counter =
708
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118k
    _memory_used_counter =
714
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118k
    _common_profile->add_info_string("IsColocate",
716
118k
                                     std::to_string(_parent->is_colocated_operator()));
717
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118k
    return Status::OK();
721
118k
}
_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
260k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
260k
    _operator_profile =
664
260k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
260k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
260k
    _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
260k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
260k
    _operator_profile->add_child(_common_profile, true);
673
260k
    _operator_profile->add_child(_custom_profile, true);
674
675
260k
    _operator_profile->set_metadata(_parent->node_id());
676
260k
    _wait_for_finish_dependency_timer =
677
260k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
260k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
260k
    if constexpr (!is_fake_shared) {
680
260k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
260k
            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
260k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
260k
            _shared_state = info.shared_state->template cast<SharedState>();
696
260k
            _dependency = _shared_state->create_sink_dependency(
697
260k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
260k
        }
699
260k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
260k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
260k
    }
702
703
260k
    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
260k
    _rows_input_counter =
708
260k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
260k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
260k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
260k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
260k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
260k
    _memory_used_counter =
714
260k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
260k
    _common_profile->add_info_string("IsColocate",
716
260k
                                     std::to_string(_parent->is_colocated_operator()));
717
260k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
260k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
260k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
260k
    return Status::OK();
721
260k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
163
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
163
    _operator_profile =
664
163
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
163
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
163
    _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
163
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
163
    _operator_profile->add_child(_common_profile, true);
673
163
    _operator_profile->add_child(_custom_profile, true);
674
675
163
    _operator_profile->set_metadata(_parent->node_id());
676
163
    _wait_for_finish_dependency_timer =
677
163
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
163
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
163
    if constexpr (!is_fake_shared) {
680
163
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
163
            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
163
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
163
            _shared_state = info.shared_state->template cast<SharedState>();
696
163
            _dependency = _shared_state->create_sink_dependency(
697
163
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
163
        }
699
163
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
163
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
163
    }
702
703
163
    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
163
    _rows_input_counter =
708
163
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
163
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
163
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
163
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
163
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
163
    _memory_used_counter =
714
163
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
163
    _common_profile->add_info_string("IsColocate",
716
163
                                     std::to_string(_parent->is_colocated_operator()));
717
163
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
163
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
163
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
163
    return Status::OK();
721
163
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.66k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.66k
    _operator_profile =
664
5.66k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.66k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.66k
    _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.66k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.66k
    _operator_profile->add_child(_common_profile, true);
673
5.66k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.66k
    _operator_profile->set_metadata(_parent->node_id());
676
5.66k
    _wait_for_finish_dependency_timer =
677
5.66k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.66k
    if constexpr (!is_fake_shared) {
680
5.66k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.66k
            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.66k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.66k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.66k
            _dependency = _shared_state->create_sink_dependency(
697
5.66k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.66k
        }
699
5.66k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.66k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.66k
    }
702
703
5.66k
    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.66k
    _rows_input_counter =
708
5.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.66k
    _memory_used_counter =
714
5.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.66k
    _common_profile->add_info_string("IsColocate",
716
5.66k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.66k
    return Status::OK();
721
5.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.54k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.54k
    _operator_profile =
664
9.54k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.54k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.54k
    _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.54k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.54k
    _operator_profile->add_child(_common_profile, true);
673
9.54k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.54k
    _operator_profile->set_metadata(_parent->node_id());
676
9.54k
    _wait_for_finish_dependency_timer =
677
9.54k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.54k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.54k
    if constexpr (!is_fake_shared) {
680
9.54k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.54k
            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.54k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.54k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.54k
            _dependency = _shared_state->create_sink_dependency(
697
9.54k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.54k
        }
699
9.54k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.54k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.54k
    }
702
703
9.54k
    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.54k
    _rows_input_counter =
708
9.54k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.54k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.54k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.54k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.54k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.54k
    _memory_used_counter =
714
9.54k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.54k
    _common_profile->add_info_string("IsColocate",
716
9.54k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.54k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.54k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.54k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.54k
    return Status::OK();
721
9.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
108k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
108k
    _operator_profile =
664
108k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
108k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
108k
    _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
108k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
108k
    _operator_profile->add_child(_common_profile, true);
673
108k
    _operator_profile->add_child(_custom_profile, true);
674
675
108k
    _operator_profile->set_metadata(_parent->node_id());
676
108k
    _wait_for_finish_dependency_timer =
677
108k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
108k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
108k
    if constexpr (!is_fake_shared) {
680
108k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
108k
            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
108k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
108k
            _shared_state = info.shared_state->template cast<SharedState>();
696
108k
            _dependency = _shared_state->create_sink_dependency(
697
108k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
108k
        }
699
108k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
108k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
108k
    }
702
703
108k
    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
108k
    _rows_input_counter =
708
108k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
108k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
108k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
108k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
108k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
108k
    _memory_used_counter =
714
108k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
108k
    _common_profile->add_info_string("IsColocate",
716
108k
                                     std::to_string(_parent->is_colocated_operator()));
717
108k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
108k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
108k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
108k
    return Status::OK();
721
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
79.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
79.4k
    _operator_profile =
664
79.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
79.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
79.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
79.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
79.4k
    _operator_profile->add_child(_common_profile, true);
673
79.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
79.4k
    _operator_profile->set_metadata(_parent->node_id());
676
79.4k
    _wait_for_finish_dependency_timer =
677
79.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
79.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
79.4k
    if constexpr (!is_fake_shared) {
680
79.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
79.5k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
79.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
79.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
79.5k
                                                  ? 0
688
79.5k
                                                  : info.task_idx]
689
79.5k
                                  .get();
690
79.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
79.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
79.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
79.4k
    }
702
703
79.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
79.4k
    _rows_input_counter =
708
79.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
79.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
79.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
79.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
79.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
79.4k
    _memory_used_counter =
714
79.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
79.4k
    _common_profile->add_info_string("IsColocate",
716
79.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
79.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
79.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
79.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
79.4k
    return Status::OK();
721
79.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
133
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
133
    _operator_profile =
664
133
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
133
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
133
    _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
133
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
133
    _operator_profile->add_child(_common_profile, true);
673
133
    _operator_profile->add_child(_custom_profile, true);
674
675
133
    _operator_profile->set_metadata(_parent->node_id());
676
133
    _wait_for_finish_dependency_timer =
677
133
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
133
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
133
    if constexpr (!is_fake_shared) {
680
133
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
133
            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
133
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
133
            _shared_state = info.shared_state->template cast<SharedState>();
696
133
            _dependency = _shared_state->create_sink_dependency(
697
133
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
133
        }
699
133
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
133
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
133
    }
702
703
133
    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
133
    _rows_input_counter =
708
133
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
133
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
133
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
133
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
133
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
133
    _memory_used_counter =
714
133
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
133
    _common_profile->add_info_string("IsColocate",
716
133
                                     std::to_string(_parent->is_colocated_operator()));
717
133
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
133
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
133
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
133
    return Status::OK();
721
133
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
570k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
570k
    _operator_profile =
664
570k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
570k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
570k
    _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
570k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
570k
    _operator_profile->add_child(_common_profile, true);
673
570k
    _operator_profile->add_child(_custom_profile, true);
674
675
570k
    _operator_profile->set_metadata(_parent->node_id());
676
570k
    _wait_for_finish_dependency_timer =
677
570k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
570k
    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
570k
    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
570k
    _rows_input_counter =
708
570k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
570k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
570k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
570k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
570k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
570k
    _memory_used_counter =
714
570k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
570k
    _common_profile->add_info_string("IsColocate",
716
570k
                                     std::to_string(_parent->is_colocated_operator()));
717
570k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
570k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
570k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
570k
    return Status::OK();
721
570k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.1k
    _operator_profile =
664
10.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
10.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.1k
    _operator_profile->add_child(_common_profile, true);
673
10.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.1k
    _operator_profile->set_metadata(_parent->node_id());
676
10.1k
    _wait_for_finish_dependency_timer =
677
10.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.1k
    if constexpr (!is_fake_shared) {
680
10.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.1k
            _dependency = _shared_state->create_sink_dependency(
697
10.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.1k
        }
699
10.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.1k
    }
702
703
10.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
10.1k
    _rows_input_counter =
708
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.1k
    _memory_used_counter =
714
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.1k
    _common_profile->add_info_string("IsColocate",
716
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.1k
    return Status::OK();
721
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
541
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
541
    _operator_profile =
664
541
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
541
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
541
    _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
541
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
541
    _operator_profile->add_child(_common_profile, true);
673
541
    _operator_profile->add_child(_custom_profile, true);
674
675
541
    _operator_profile->set_metadata(_parent->node_id());
676
541
    _wait_for_finish_dependency_timer =
677
541
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
541
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
541
    if constexpr (!is_fake_shared) {
680
541
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
541
            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
541
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
541
            _shared_state = info.shared_state->template cast<SharedState>();
696
541
            _dependency = _shared_state->create_sink_dependency(
697
541
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
541
        }
699
541
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
541
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
541
    }
702
703
543
    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
541
    _rows_input_counter =
708
541
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
541
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
541
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
541
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
541
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
541
    _memory_used_counter =
714
541
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
541
    _common_profile->add_info_string("IsColocate",
716
541
                                     std::to_string(_parent->is_colocated_operator()));
717
541
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
541
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
541
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
541
    return Status::OK();
721
541
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.91k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.91k
    _operator_profile =
664
1.91k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.91k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.91k
    _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.91k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.91k
    _operator_profile->add_child(_common_profile, true);
673
1.91k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.91k
    _operator_profile->set_metadata(_parent->node_id());
676
1.91k
    _wait_for_finish_dependency_timer =
677
1.91k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.91k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.91k
    if constexpr (!is_fake_shared) {
680
1.91k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.91k
            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
1.91k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.91k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.91k
            _dependency = _shared_state->create_sink_dependency(
697
1.91k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.91k
        }
699
1.91k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.91k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.91k
    }
702
703
1.91k
    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.91k
    _rows_input_counter =
708
1.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.91k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.91k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.91k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.91k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.91k
    _memory_used_counter =
714
1.91k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.91k
    _common_profile->add_info_string("IsColocate",
716
1.91k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.91k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.91k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.91k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.91k
    return Status::OK();
721
1.91k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.9k
    _operator_profile =
664
12.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.9k
    _operator_profile->add_child(_common_profile, true);
673
12.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.9k
    _operator_profile->set_metadata(_parent->node_id());
676
12.9k
    _wait_for_finish_dependency_timer =
677
12.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.9k
    if constexpr (!is_fake_shared) {
680
12.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.9k
            _dependency = _shared_state->create_sink_dependency(
697
12.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.9k
        }
699
12.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.9k
    }
702
703
12.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.9k
    _rows_input_counter =
708
12.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.9k
    _memory_used_counter =
714
12.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.9k
    _common_profile->add_info_string("IsColocate",
716
12.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.9k
    return Status::OK();
721
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
295k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
295k
    _operator_profile =
664
295k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
295k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
295k
    _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
295k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
295k
    _operator_profile->add_child(_common_profile, true);
673
295k
    _operator_profile->add_child(_custom_profile, true);
674
675
295k
    _operator_profile->set_metadata(_parent->node_id());
676
295k
    _wait_for_finish_dependency_timer =
677
295k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
295k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
295k
    if constexpr (!is_fake_shared) {
680
295k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
296k
            info.shared_state_map.end()) {
682
296k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
296k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
296k
            }
685
296k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
296k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
296k
                                                  ? 0
688
296k
                                                  : info.task_idx]
689
296k
                                  .get();
690
296k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
295k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
295k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
295k
    }
702
703
295k
    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
295k
    _rows_input_counter =
708
295k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
295k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
295k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
295k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
295k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
295k
    _memory_used_counter =
714
295k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
295k
    _common_profile->add_info_string("IsColocate",
716
295k
                                     std::to_string(_parent->is_colocated_operator()));
717
295k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
295k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
295k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
295k
    return Status::OK();
721
295k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
447k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
447k
    _operator_profile =
664
447k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
447k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
447k
    _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
447k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
447k
    _operator_profile->add_child(_common_profile, true);
673
447k
    _operator_profile->add_child(_custom_profile, true);
674
675
447k
    _operator_profile->set_metadata(_parent->node_id());
676
447k
    _wait_for_finish_dependency_timer =
677
447k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
447k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
447k
    if constexpr (!is_fake_shared) {
680
447k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
447k
            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
447k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
447k
            _shared_state = info.shared_state->template cast<SharedState>();
696
447k
            _dependency = _shared_state->create_sink_dependency(
697
447k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
447k
        }
699
447k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
447k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
447k
    }
702
703
447k
    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
447k
    _rows_input_counter =
708
447k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
447k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
447k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
447k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
447k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
447k
    _memory_used_counter =
714
447k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
447k
    _common_profile->add_info_string("IsColocate",
716
447k
                                     std::to_string(_parent->is_colocated_operator()));
717
447k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
447k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
447k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
447k
    return Status::OK();
721
447k
}
_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.92M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.92M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.92M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.35M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.35M
    }
731
1.92M
    _closed = true;
732
1.92M
    return Status::OK();
733
1.92M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118k
    }
731
118k
    _closed = true;
732
118k
    return Status::OK();
733
118k
}
_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
259k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
259k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
259k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
259k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
259k
    }
731
259k
    _closed = true;
732
259k
    return Status::OK();
733
259k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
153
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
153
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
151
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
151
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
151
    }
731
151
    _closed = true;
732
151
    return Status::OK();
733
153
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.64k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.64k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.64k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.64k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.64k
    }
731
5.64k
    _closed = true;
732
5.64k
    return Status::OK();
733
5.64k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.49k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.49k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.49k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.49k
    }
731
9.49k
    _closed = true;
732
9.49k
    return Status::OK();
733
9.49k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
108k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
108k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
108k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
108k
    }
731
108k
    _closed = true;
732
108k
    return Status::OK();
733
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
79.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
79.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
79.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
79.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
79.3k
    }
731
79.3k
    _closed = true;
732
79.3k
    return Status::OK();
733
79.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
122
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
122
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
122
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
122
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
122
    }
731
122
    _closed = true;
732
122
    return Status::OK();
733
122
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
571k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
571k
    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
571k
    _closed = true;
732
571k
    return Status::OK();
733
571k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.1k
    }
731
10.1k
    _closed = true;
732
10.1k
    return Status::OK();
733
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
438
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
438
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
438
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
438
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
438
    }
731
438
    _closed = true;
732
438
    return Status::OK();
733
438
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.94k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.94k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.94k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.94k
    }
731
1.94k
    _closed = true;
732
1.94k
    return Status::OK();
733
1.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.9k
    }
731
12.9k
    _closed = true;
732
12.9k
    return Status::OK();
733
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
296k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
296k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
296k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
296k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
296k
    }
731
296k
    _closed = true;
732
296k
    return Status::OK();
733
296k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
451k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
451k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
451k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
451k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
451k
    }
731
451k
    _closed = true;
732
451k
    return Status::OK();
733
451k
}
_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.36k
                                                          bool* eos) {
738
1.36k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.35k
    return pull(state, block, eos);
740
1.36k
}
_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.32k
                                                          bool* eos) {
738
1.32k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.32k
    return pull(state, block, eos);
740
1.32k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
550k
                                                         bool* eos) {
745
550k
    auto& local_state = get_local_state(state);
746
550k
    if (need_more_input_data(state)) {
747
519k
        local_state._child_block->clear_column_data(
748
519k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
519k
                        .num_slots());
750
519k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
519k
                state, local_state._child_block.get(), &local_state._child_eos));
752
519k
        *eos = local_state._child_eos;
753
519k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
73.0k
            return Status::OK();
755
73.0k
        }
756
446k
        {
757
446k
            SCOPED_TIMER(local_state.exec_time_counter());
758
446k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
446k
        }
760
446k
    }
761
762
477k
    if (!need_more_input_data(state)) {
763
448k
        SCOPED_TIMER(local_state.exec_time_counter());
764
448k
        bool new_eos = false;
765
448k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
448k
        if (new_eos) {
767
374k
            *eos = true;
768
374k
        } else if (!need_more_input_data(state)) {
769
23.8k
            *eos = false;
770
23.8k
        }
771
448k
    }
772
477k
    return Status::OK();
773
477k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
133k
                                                         bool* eos) {
745
133k
    auto& local_state = get_local_state(state);
746
133k
    if (need_more_input_data(state)) {
747
114k
        local_state._child_block->clear_column_data(
748
114k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
114k
                        .num_slots());
750
114k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
114k
                state, local_state._child_block.get(), &local_state._child_eos));
752
114k
        *eos = local_state._child_eos;
753
114k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
34.4k
            return Status::OK();
755
34.4k
        }
756
80.2k
        {
757
80.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
80.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
80.2k
        }
760
80.2k
    }
761
762
99.5k
    if (!need_more_input_data(state)) {
763
99.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
99.5k
        bool new_eos = false;
765
99.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
99.5k
        if (new_eos) {
767
45.6k
            *eos = true;
768
53.8k
        } else if (!need_more_input_data(state)) {
769
11.1k
            *eos = false;
770
11.1k
        }
771
99.5k
    }
772
99.5k
    return Status::OK();
773
99.5k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.41k
                                                         bool* eos) {
745
4.41k
    auto& local_state = get_local_state(state);
746
4.41k
    if (need_more_input_data(state)) {
747
2.47k
        local_state._child_block->clear_column_data(
748
2.47k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.47k
                        .num_slots());
750
2.47k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.47k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.47k
        *eos = local_state._child_eos;
753
2.47k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
478
            return Status::OK();
755
478
        }
756
1.99k
        {
757
1.99k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.99k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.99k
        }
760
1.99k
    }
761
762
3.93k
    if (!need_more_input_data(state)) {
763
3.93k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.93k
        bool new_eos = false;
765
3.93k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.93k
        if (new_eos) {
767
1.37k
            *eos = true;
768
2.56k
        } else if (!need_more_input_data(state)) {
769
1.93k
            *eos = false;
770
1.93k
        }
771
3.93k
    }
772
3.93k
    return Status::OK();
773
3.93k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.87k
                                                         bool* eos) {
745
1.87k
    auto& local_state = get_local_state(state);
746
1.87k
    if (need_more_input_data(state)) {
747
1.87k
        local_state._child_block->clear_column_data(
748
1.87k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.87k
                        .num_slots());
750
1.87k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.87k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.87k
        *eos = local_state._child_eos;
753
1.87k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
782
            return Status::OK();
755
782
        }
756
1.09k
        {
757
1.09k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.09k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.09k
        }
760
1.09k
    }
761
762
1.09k
    if (!need_more_input_data(state)) {
763
1.09k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.09k
        bool new_eos = false;
765
1.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.09k
        if (new_eos) {
767
801
            *eos = true;
768
801
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.09k
    }
772
1.09k
    return Status::OK();
773
1.09k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
17.8k
                                                         bool* eos) {
745
17.8k
    auto& local_state = get_local_state(state);
746
17.8k
    if (need_more_input_data(state)) {
747
17.8k
        local_state._child_block->clear_column_data(
748
17.8k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.8k
                        .num_slots());
750
17.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.8k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.8k
        *eos = local_state._child_eos;
753
17.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.59k
            return Status::OK();
755
3.59k
        }
756
14.2k
        {
757
14.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.2k
        }
760
14.2k
    }
761
762
14.2k
    if (!need_more_input_data(state)) {
763
8.41k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.41k
        bool new_eos = false;
765
8.41k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.41k
        if (new_eos) {
767
8.19k
            *eos = true;
768
8.19k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
8.41k
    }
772
14.2k
    return Status::OK();
773
14.2k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
362k
                                                         bool* eos) {
745
362k
    auto& local_state = get_local_state(state);
746
363k
    if (need_more_input_data(state)) {
747
363k
        local_state._child_block->clear_column_data(
748
363k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
363k
                        .num_slots());
750
363k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
363k
                state, local_state._child_block.get(), &local_state._child_eos));
752
363k
        *eos = local_state._child_eos;
753
363k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
32.6k
            return Status::OK();
755
32.6k
        }
756
330k
        {
757
330k
            SCOPED_TIMER(local_state.exec_time_counter());
758
330k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
330k
        }
760
330k
    }
761
762
330k
    if (!need_more_input_data(state)) {
763
307k
        SCOPED_TIMER(local_state.exec_time_counter());
764
307k
        bool new_eos = false;
765
307k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
307k
        if (new_eos) {
767
306k
            *eos = true;
768
306k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
307k
    }
772
330k
    return Status::OK();
773
330k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.1k
                                                         bool* eos) {
745
20.1k
    auto& local_state = get_local_state(state);
746
20.1k
    if (need_more_input_data(state)) {
747
9.78k
        local_state._child_block->clear_column_data(
748
9.78k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.78k
                        .num_slots());
750
9.78k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.78k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.78k
        *eos = local_state._child_eos;
753
9.78k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
333
            return Status::OK();
755
333
        }
756
9.44k
        {
757
9.44k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.44k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.44k
        }
760
9.44k
    }
761
762
19.8k
    if (!need_more_input_data(state)) {
763
19.3k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.3k
        bool new_eos = false;
765
19.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.3k
        if (new_eos) {
767
5.63k
            *eos = true;
768
13.7k
        } else if (!need_more_input_data(state)) {
769
10.4k
            *eos = false;
770
10.4k
        }
771
19.3k
    }
772
19.8k
    return Status::OK();
773
19.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
9.76k
                                                         bool* eos) {
745
9.76k
    auto& local_state = get_local_state(state);
746
9.76k
    if (need_more_input_data(state)) {
747
9.41k
        local_state._child_block->clear_column_data(
748
9.41k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.41k
                        .num_slots());
750
9.41k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.41k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.41k
        *eos = local_state._child_eos;
753
9.41k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
760
            return Status::OK();
755
760
        }
756
8.65k
        {
757
8.65k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.65k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.65k
        }
760
8.65k
    }
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.49k
            *eos = true;
768
6.49k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
9.00k
    }
772
8.99k
    return Status::OK();
773
8.99k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
50.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.4k
                                                         "AsyncWriterDependency", true);
781
50.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.4k
                             _finish_dependency));
783
784
50.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.4k
    return Status::OK();
787
50.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
363
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
363
    RETURN_IF_ERROR(Base::init(state, info));
779
363
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
363
                                                         "AsyncWriterDependency", true);
781
363
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
363
                             _finish_dependency));
783
784
363
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
363
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
363
    return Status::OK();
787
363
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
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_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
36
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
36
    RETURN_IF_ERROR(Base::init(state, info));
779
36
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
36
                                                         "AsyncWriterDependency", true);
781
36
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
36
                             _finish_dependency));
783
784
36
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
36
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
36
    return Status::OK();
787
36
}
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.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.9k
    RETURN_IF_ERROR(Base::open(state));
793
50.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
385k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
334k
        RETURN_IF_ERROR(
796
334k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
334k
    }
798
50.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.9k
    return Status::OK();
800
50.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
364
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
364
    RETURN_IF_ERROR(Base::open(state));
793
364
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.84k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
364
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
364
    return Status::OK();
800
364
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
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
383k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
332k
        RETURN_IF_ERROR(
796
332k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
332k
    }
798
50.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.5k
    return Status::OK();
800
50.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
36
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
36
    RETURN_IF_ERROR(Base::open(state));
793
36
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
648
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
612
        RETURN_IF_ERROR(
796
612
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
612
    }
798
36
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
36
    return Status::OK();
800
36
}
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
66.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.6k
    return _writer->sink(block, eos);
806
66.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.72k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.72k
    return _writer->sink(block, eos);
806
1.72k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.8k
    return _writer->sink(block, eos);
806
64.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
36
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
36
    return _writer->sink(block, eos);
806
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
51.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
51.1k
    if (_writer) {
818
51.1k
        Status st = _writer->get_writer_status();
819
51.1k
        if (exec_status.ok()) {
820
50.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.9k
                                                       : Status::Cancelled("force close"));
822
50.9k
        } else {
823
175
            _writer->force_close(exec_status);
824
175
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
51.1k
        RETURN_IF_ERROR(st);
829
51.1k
    }
830
50.9k
    return Base::close(state, exec_status);
831
51.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
353
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
353
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
353
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
353
    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
353
    if (_writer) {
818
353
        Status st = _writer->get_writer_status();
819
353
        if (exec_status.ok()) {
820
353
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
353
                                                       : Status::Cancelled("force close"));
822
353
        } 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
353
        RETURN_IF_ERROR(st);
829
353
    }
830
353
    return Base::close(state, exec_status);
831
353
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
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
175
            _writer->force_close(exec_status);
824
175
        }
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_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
36
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
36
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
36
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
36
    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
36
    if (_writer) {
818
36
        Status st = _writer->get_writer_status();
819
36
        if (exec_status.ok()) {
820
36
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
36
                                                       : Status::Cancelled("force close"));
822
36
        } 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
36
        RETURN_IF_ERROR(st);
829
36
    }
830
36
    return Base::close(state, exec_status);
831
36
}
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