Coverage Report

Created: 2026-03-26 10:56

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 "common/status.h"
21
#include "exec/common/util.hpp"
22
#include "exec/exchange/local_exchange_sink_operator.h"
23
#include "exec/exchange/local_exchange_source_operator.h"
24
#include "exec/operator/aggregation_sink_operator.h"
25
#include "exec/operator/aggregation_source_operator.h"
26
#include "exec/operator/analytic_sink_operator.h"
27
#include "exec/operator/analytic_source_operator.h"
28
#include "exec/operator/assert_num_rows_operator.h"
29
#include "exec/operator/blackhole_sink_operator.h"
30
#include "exec/operator/cache_sink_operator.h"
31
#include "exec/operator/cache_source_operator.h"
32
#include "exec/operator/datagen_operator.h"
33
#include "exec/operator/dict_sink_operator.h"
34
#include "exec/operator/distinct_streaming_aggregation_operator.h"
35
#include "exec/operator/empty_set_operator.h"
36
#include "exec/operator/es_scan_operator.h"
37
#include "exec/operator/exchange_sink_operator.h"
38
#include "exec/operator/exchange_source_operator.h"
39
#include "exec/operator/file_scan_operator.h"
40
#include "exec/operator/group_commit_block_sink_operator.h"
41
#include "exec/operator/group_commit_scan_operator.h"
42
#include "exec/operator/hashjoin_build_sink.h"
43
#include "exec/operator/hashjoin_probe_operator.h"
44
#include "exec/operator/hive_table_sink_operator.h"
45
#include "exec/operator/iceberg_delete_sink_operator.h"
46
#include "exec/operator/iceberg_merge_sink_operator.h"
47
#include "exec/operator/iceberg_table_sink_operator.h"
48
#include "exec/operator/jdbc_scan_operator.h"
49
#include "exec/operator/jdbc_table_sink_operator.h"
50
#include "exec/operator/local_merge_sort_source_operator.h"
51
#include "exec/operator/materialization_opertor.h"
52
#include "exec/operator/maxcompute_table_sink_operator.h"
53
#include "exec/operator/memory_scratch_sink_operator.h"
54
#include "exec/operator/meta_scan_operator.h"
55
#include "exec/operator/mock_operator.h"
56
#include "exec/operator/mock_scan_operator.h"
57
#include "exec/operator/multi_cast_data_stream_sink.h"
58
#include "exec/operator/multi_cast_data_stream_source.h"
59
#include "exec/operator/nested_loop_join_build_operator.h"
60
#include "exec/operator/nested_loop_join_probe_operator.h"
61
#include "exec/operator/olap_scan_operator.h"
62
#include "exec/operator/olap_table_sink_operator.h"
63
#include "exec/operator/olap_table_sink_v2_operator.h"
64
#include "exec/operator/partition_sort_sink_operator.h"
65
#include "exec/operator/partition_sort_source_operator.h"
66
#include "exec/operator/partitioned_aggregation_sink_operator.h"
67
#include "exec/operator/partitioned_aggregation_source_operator.h"
68
#include "exec/operator/partitioned_hash_join_probe_operator.h"
69
#include "exec/operator/partitioned_hash_join_sink_operator.h"
70
#include "exec/operator/rec_cte_anchor_sink_operator.h"
71
#include "exec/operator/rec_cte_scan_operator.h"
72
#include "exec/operator/rec_cte_sink_operator.h"
73
#include "exec/operator/rec_cte_source_operator.h"
74
#include "exec/operator/repeat_operator.h"
75
#include "exec/operator/result_file_sink_operator.h"
76
#include "exec/operator/result_sink_operator.h"
77
#include "exec/operator/schema_scan_operator.h"
78
#include "exec/operator/select_operator.h"
79
#include "exec/operator/set_probe_sink_operator.h"
80
#include "exec/operator/set_sink_operator.h"
81
#include "exec/operator/set_source_operator.h"
82
#include "exec/operator/sort_sink_operator.h"
83
#include "exec/operator/sort_source_operator.h"
84
#include "exec/operator/spill_iceberg_table_sink_operator.h"
85
#include "exec/operator/spill_sort_sink_operator.h"
86
#include "exec/operator/spill_sort_source_operator.h"
87
#include "exec/operator/streaming_aggregation_operator.h"
88
#include "exec/operator/table_function_operator.h"
89
#include "exec/operator/tvf_table_sink_operator.h"
90
#include "exec/operator/union_sink_operator.h"
91
#include "exec/operator/union_source_operator.h"
92
#include "exec/pipeline/dependency.h"
93
#include "exec/pipeline/pipeline.h"
94
#include "exprs/vexpr.h"
95
#include "exprs/vexpr_context.h"
96
#include "runtime/runtime_profile.h"
97
#include "runtime/runtime_profile_counter_names.h"
98
#include "util/debug_util.h"
99
#include "util/string_util.h"
100
101
namespace doris {
102
#include "common/compile_check_begin.h"
103
class RowDescriptor;
104
class RuntimeState;
105
} // namespace doris
106
107
namespace doris {
108
109
0
Status OperatorBase::close(RuntimeState* state) {
110
0
    if (_is_closed) {
111
0
        return Status::OK();
112
0
    }
113
0
    _is_closed = true;
114
0
    return Status::OK();
115
0
}
116
117
template <typename SharedStateArg>
118
2.12M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.12M
    if (_parent->nereids_id() == -1) {
120
1.09M
        return fmt::format("(id={})", _parent->node_id());
121
1.09M
    } else {
122
1.03M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.03M
    }
124
2.12M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
134k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
134k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
134k
    } else {
122
134k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
134k
    }
124
134k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1
    if (_parent->nereids_id() == -1) {
120
1
        return fmt::format("(id={})", _parent->node_id());
121
1
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
189k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
189k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
189k
    } else {
122
189k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
189k
    }
124
189k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
23
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
23
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
23
    } else {
122
23
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
23
    }
124
23
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.49k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.49k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
6.49k
    } else {
122
6.49k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.49k
    }
124
6.49k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.2k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
10.2k
    } else {
122
10.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
10.2k
    }
124
10.2k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
121k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
121k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
121k
    } else {
122
121k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
121k
    }
124
121k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
612
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
612
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
612
    } else {
122
612
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
612
    }
124
612
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
935k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
935k
    if (_parent->nereids_id() == -1) {
120
422k
        return fmt::format("(id={})", _parent->node_id());
121
512k
    } else {
122
512k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
512k
    }
124
935k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
50.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
50.9k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
50.9k
    } else {
122
50.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
50.9k
    }
124
50.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
110
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
110
    if (_parent->nereids_id() == -1) {
120
110
        return fmt::format("(id={})", _parent->node_id());
121
110
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
110
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.75k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.75k
    if (_parent->nereids_id() == -1) {
120
6.75k
        return fmt::format("(id={})", _parent->node_id());
121
18.4E
    } else {
122
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
18.4E
    }
124
6.75k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
449
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
449
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
347
    } else {
122
347
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
347
    }
124
449
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.86k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.86k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
4.85k
    } else {
122
4.85k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.85k
    }
124
4.86k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
667k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
667k
    if (_parent->nereids_id() == -1) {
120
667k
        return fmt::format("(id={})", _parent->node_id());
121
18.4E
    } else {
122
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
18.4E
    }
124
667k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
150
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
150
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
150
    } else {
122
150
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
150
    }
124
150
}
125
126
template <typename SharedStateArg>
127
1.29M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.29M
    if (_parent->nereids_id() == -1) {
129
773k
        return fmt::format("(id={})", _parent->node_id());
130
773k
    } else {
131
522k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
522k
    }
133
1.29M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
183k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
183k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
183k
    } else {
131
183k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
183k
    }
133
183k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
2
    if (_parent->nereids_id() == -1) {
129
1
        return fmt::format("(id={})", _parent->node_id());
130
1
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
191k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
191k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
191k
    } else {
131
191k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
191k
    }
133
191k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
29
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
29
    } else {
131
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
29
    }
133
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.74k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.74k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
6.74k
    } else {
131
6.74k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.74k
    }
133
6.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
10.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
10.2k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
10.2k
    } else {
131
10.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
10.2k
    }
133
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
122k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
122k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
122k
    } else {
131
122k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
122k
    }
133
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
622
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
622
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
622
    } else {
131
622
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
622
    }
133
622
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
21
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
21
    if (_parent->nereids_id() == -1) {
129
21
        return fmt::format("(id={})", _parent->node_id());
130
21
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
21
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.97k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.97k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
6.97k
    } else {
131
6.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.97k
    }
133
6.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
453
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
453
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
351
    } else {
131
351
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
351
    }
133
453
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
11.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
11.9k
    if (_parent->nereids_id() == -1) {
129
11.9k
        return fmt::format("(id={})", _parent->node_id());
130
11.9k
    } else {
131
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5
    }
133
11.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
319k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
319k
    if (_parent->nereids_id() == -1) {
129
319k
        return fmt::format("(id={})", _parent->node_id());
130
18.4E
    } else {
131
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
18.4E
    }
133
319k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
441k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
441k
    if (_parent->nereids_id() == -1) {
129
441k
        return fmt::format("(id={})", _parent->node_id());
130
441k
    } else {
131
247
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
247
    }
133
441k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
111
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
111
    if (_parent->nereids_id() == -1) {
129
110
        return fmt::format("(id={})", _parent->node_id());
130
110
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
111
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
299
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
299
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
299
    } else {
131
299
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
299
    }
133
299
}
134
135
template <typename SharedStateArg>
136
29.5k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
29.5k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
29.5k
    _terminated = true;
141
29.5k
    return Status::OK();
142
29.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
24.0k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
24.0k
    _terminated = true;
141
24.0k
    return Status::OK();
142
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
676
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
676
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
676
    _terminated = true;
141
676
    return Status::OK();
142
676
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
6
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
6
    _terminated = true;
141
6
    return Status::OK();
142
6
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2.61k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.61k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.61k
    _terminated = true;
141
2.61k
    return Status::OK();
142
2.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.84k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.84k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
1.83k
    _terminated = true;
141
1.83k
    return Status::OK();
142
1.84k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
5
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
5
    _terminated = true;
141
5
    return Status::OK();
142
5
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
9
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
9
    _terminated = true;
141
9
    return Status::OK();
142
9
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
261
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
261
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
261
    _terminated = true;
141
261
    return Status::OK();
142
261
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
135
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
135
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
135
    _terminated = true;
141
135
    return Status::OK();
142
135
}
143
144
660k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
660k
    return _child && _child->is_serial_operator() && !is_source()
146
660k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
660k
                   : DataDistribution(ExchangeType::NOOP);
148
660k
}
149
150
81.0k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.0k
    return _child->row_desc();
152
81.0k
}
153
154
template <typename SharedStateArg>
155
52.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
52.3k
    fmt::memory_buffer debug_string_buffer;
157
52.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
52.3k
    return fmt::to_string(debug_string_buffer);
159
52.3k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
18
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
18
    fmt::memory_buffer debug_string_buffer;
157
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
18
    return fmt::to_string(debug_string_buffer);
159
18
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
6
    fmt::memory_buffer debug_string_buffer;
157
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
6
    return fmt::to_string(debug_string_buffer);
159
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
6
    fmt::memory_buffer debug_string_buffer;
157
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
6
    return fmt::to_string(debug_string_buffer);
159
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
12
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
12
    fmt::memory_buffer debug_string_buffer;
157
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
12
    return fmt::to_string(debug_string_buffer);
159
12
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
52.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
52.1k
    fmt::memory_buffer debug_string_buffer;
157
52.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
52.1k
    return fmt::to_string(debug_string_buffer);
159
52.1k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
1
    fmt::memory_buffer debug_string_buffer;
157
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
1
    return fmt::to_string(debug_string_buffer);
159
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
155
86
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
86
    fmt::memory_buffer debug_string_buffer;
157
86
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
86
    return fmt::to_string(debug_string_buffer);
159
86
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
52.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
52.2k
    fmt::memory_buffer debug_string_buffer;
164
52.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
52.2k
    return fmt::to_string(debug_string_buffer);
166
52.2k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
3
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
3
    fmt::memory_buffer debug_string_buffer;
164
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
3
    return fmt::to_string(debug_string_buffer);
166
3
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
6
    fmt::memory_buffer debug_string_buffer;
164
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
6
    return fmt::to_string(debug_string_buffer);
166
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
3
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
3
    fmt::memory_buffer debug_string_buffer;
164
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
3
    return fmt::to_string(debug_string_buffer);
166
3
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
12
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
12
    fmt::memory_buffer debug_string_buffer;
164
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
12
    return fmt::to_string(debug_string_buffer);
166
12
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
71
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
71
    fmt::memory_buffer debug_string_buffer;
164
71
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
71
    return fmt::to_string(debug_string_buffer);
166
71
}
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
162
20
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20
    fmt::memory_buffer debug_string_buffer;
164
20
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20
    return fmt::to_string(debug_string_buffer);
166
20
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
52.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
52.1k
    fmt::memory_buffer debug_string_buffer;
164
52.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
52.1k
    return fmt::to_string(debug_string_buffer);
166
52.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
52.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
52.4k
    fmt::memory_buffer debug_string_buffer;
170
52.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
52.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
52.4k
                   _is_serial_operator);
173
52.4k
    return fmt::to_string(debug_string_buffer);
174
52.4k
}
175
176
52.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
52.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
52.3k
}
179
180
590k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
590k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
590k
    _nereids_id = tnode.nereids_id;
183
590k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
2.89k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
2.89k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
2.89k
            tnode.intermediate_projections_list.size()) {
189
0
            return Status::InternalError(
190
0
                    "intermediate_output_tuple_id_list size:{} not match "
191
0
                    "intermediate_projections_list size:{}",
192
0
                    tnode.intermediate_output_tuple_id_list.size(),
193
0
                    tnode.intermediate_projections_list.size());
194
0
        }
195
2.89k
    }
196
590k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
590k
    _op_name = substr + "_OPERATOR";
198
199
590k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
590k
    } else if (tnode.__isset.conjuncts) {
202
260k
        for (const auto& conjunct : tnode.conjuncts) {
203
260k
            VExprContextSPtr context;
204
260k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
260k
            _conjuncts.emplace_back(context);
206
260k
        }
207
88.4k
    }
208
209
    // create the projections expr
210
590k
    if (tnode.__isset.projections) {
211
248k
        DCHECK(tnode.__isset.output_tuple_id);
212
248k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
248k
    }
214
590k
    if (!tnode.intermediate_projections_list.empty()) {
215
2.89k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
2.89k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
3.79k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
3.79k
            VExprContextSPtrs projections;
219
3.79k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
3.79k
            _intermediate_projections.push_back(projections);
221
3.79k
        }
222
2.89k
    }
223
590k
    return Status::OK();
224
590k
}
225
226
618k
Status OperatorXBase::prepare(RuntimeState* state) {
227
618k
    for (auto& conjunct : _conjuncts) {
228
260k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
260k
    }
230
618k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
568k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
343k
            return a->execute_cost() < b->execute_cost();
233
343k
        });
234
568k
    };
235
236
621k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
3.79k
        RETURN_IF_ERROR(
238
3.79k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
3.79k
    }
240
618k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
618k
    if (has_output_row_desc()) {
243
248k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
248k
    }
245
246
618k
    for (auto& conjunct : _conjuncts) {
247
260k
        RETURN_IF_ERROR(conjunct->open(state));
248
260k
    }
249
618k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
618k
    for (auto& projections : _intermediate_projections) {
251
3.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
3.79k
    }
253
618k
    if (_child && !is_source()) {
254
139k
        RETURN_IF_ERROR(_child->prepare(state));
255
139k
    }
256
257
618k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
618k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
618k
    return Status::OK();
263
618k
}
264
265
8.07k
Status OperatorXBase::terminate(RuntimeState* state) {
266
8.07k
    if (_child && !is_source()) {
267
2.48k
        RETURN_IF_ERROR(_child->terminate(state));
268
2.48k
    }
269
8.07k
    auto result = state->get_local_state_result(operator_id());
270
8.07k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
8.07k
    return result.value()->terminate(state);
274
8.07k
}
275
276
6.20M
Status OperatorXBase::close(RuntimeState* state) {
277
6.20M
    if (_child && !is_source()) {
278
1.34M
        RETURN_IF_ERROR(_child->close(state));
279
1.34M
    }
280
6.20M
    auto result = state->get_local_state_result(operator_id());
281
6.20M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.20M
    return result.value()->close(state);
285
6.20M
}
286
287
341k
void PipelineXLocalStateBase::clear_origin_block() {
288
341k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
341k
}
290
291
601k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
601k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
601k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
601k
    return Status::OK();
296
601k
}
297
298
0
bool PipelineXLocalStateBase::is_blockable() const {
299
0
    return std::any_of(_projections.begin(), _projections.end(),
300
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
301
0
}
302
303
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
304
341k
                                     Block* output_block) const {
305
341k
    auto* local_state = state->get_local_state(operator_id());
306
341k
    SCOPED_TIMER(local_state->exec_time_counter());
307
341k
    SCOPED_TIMER(local_state->_projection_timer);
308
341k
    const size_t rows = origin_block->rows();
309
341k
    if (rows == 0) {
310
219k
        return Status::OK();
311
219k
    }
312
122k
    Block input_block = *origin_block;
313
314
122k
    size_t bytes_usage = 0;
315
122k
    ColumnsWithTypeAndName new_columns;
316
122k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.10k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.10k
        new_columns.resize(projections.size());
322
7.40k
        for (int i = 0; i < projections.size(); i++) {
323
6.29k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
6.29k
            if (new_columns[i].column->size() != rows) {
325
0
                return Status::InternalError(
326
0
                        "intermediate projection result column size {} not equal input rows {}, "
327
0
                        "expr: {}",
328
0
                        new_columns[i].column->size(), rows,
329
0
                        projections[i]->root()->debug_string());
330
0
            }
331
6.29k
        }
332
1.10k
        Block tmp_block {new_columns};
333
1.10k
        bytes_usage += tmp_block.allocated_bytes();
334
1.10k
        input_block.swap(tmp_block);
335
1.10k
    }
336
337
122k
    if (input_block.rows() != rows) {
338
0
        return Status::InternalError(
339
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
340
0
                "input_block: {}",
341
0
                input_block.rows(), rows, input_block.dump_structure());
342
0
    }
343
619k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
619k
        if (to->is_nullable() && !from->is_nullable()) {
345
0
            if (_keep_origin || !from->is_exclusive()) {
346
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
347
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
348
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
349
0
                bytes_usage += null_column.allocated_bytes();
350
0
            } else {
351
0
                to = make_nullable(from, false)->assume_mutable();
352
0
            }
353
619k
        } else {
354
619k
            if (_keep_origin || !from->is_exclusive()) {
355
607k
                to->insert_range_from(*from, 0, rows);
356
607k
                bytes_usage += from->allocated_bytes();
357
607k
            } else {
358
11.9k
                to = from->assume_mutable();
359
11.9k
            }
360
619k
        }
361
619k
    };
362
363
122k
    MutableBlock mutable_block =
364
122k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
122k
    if (rows != 0) {
366
122k
        auto& mutable_columns = mutable_block.mutable_columns();
367
122k
        const size_t origin_columns_count = input_block.columns();
368
122k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
369
742k
        for (int i = 0; i < mutable_columns.size(); ++i) {
370
619k
            auto result_column_id = -1;
371
619k
            ColumnPtr column_ptr;
372
619k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
373
619k
            if (column_ptr->size() != rows) {
374
0
                return Status::InternalError(
375
0
                        "projection result column size {} not equal input rows {}, expr: {}",
376
0
                        column_ptr->size(), rows,
377
0
                        local_state->_projections[i]->root()->debug_string());
378
0
            }
379
619k
            column_ptr = column_ptr->convert_to_full_column_if_const();
380
619k
            if (result_column_id >= origin_columns_count) {
381
619k
                bytes_usage += column_ptr->allocated_bytes();
382
619k
            }
383
619k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
384
619k
        }
385
122k
        DCHECK(mutable_block.rows() == rows);
386
122k
        output_block->set_columns(std::move(mutable_columns));
387
122k
    }
388
389
122k
    local_state->_estimate_memory_usage += bytes_usage;
390
391
122k
    return Status::OK();
392
122k
}
393
394
3.71M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
395
3.71M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
396
3.71M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
397
3.71M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
398
3.71M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
399
3.71M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
400
3.71M
            if (_debug_point_count++ % 2 == 0) {
401
3.71M
                return Status::OK();
402
3.71M
            }
403
3.71M
        }
404
3.71M
    });
405
406
3.71M
    Status status;
407
3.71M
    auto* local_state = state->get_local_state(operator_id());
408
3.72M
    Defer defer([&]() {
409
3.72M
        if (status.ok()) {
410
3.71M
            if (auto rows = block->rows()) {
411
739k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
412
739k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
413
739k
            }
414
3.71M
        }
415
3.72M
    });
416
3.71M
    if (_output_row_descriptor) {
417
341k
        local_state->clear_origin_block();
418
341k
        status = get_block(state, &local_state->_origin_block, eos);
419
341k
        if (UNLIKELY(!status.ok())) {
420
14
            return status;
421
14
        }
422
341k
        status = do_projections(state, &local_state->_origin_block, block);
423
341k
        return status;
424
341k
    }
425
3.37M
    status = get_block(state, block, eos);
426
3.37M
    RETURN_IF_ERROR(block->check_type_and_column());
427
3.37M
    return status;
428
3.37M
}
429
430
2.43M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
431
2.43M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
432
1.65k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
433
1.65k
        *eos = true;
434
1.65k
    }
435
436
2.43M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
437
2.43M
        auto op_name = to_lower(_parent->_op_name);
438
2.43M
        auto arg_op_name = dp->param<std::string>("op_name");
439
2.43M
        arg_op_name = to_lower(arg_op_name);
440
441
2.43M
        if (op_name == arg_op_name) {
442
2.43M
            *eos = true;
443
2.43M
        }
444
2.43M
    });
445
446
2.43M
    if (auto rows = block->rows()) {
447
666k
        _num_rows_returned += rows;
448
666k
    }
449
2.43M
}
450
451
29.5k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
452
29.5k
    auto result = state->get_sink_local_state_result();
453
29.5k
    if (!result) {
454
0
        return result.error();
455
0
    }
456
29.5k
    return result.value()->terminate(state);
457
29.5k
}
458
459
52.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
460
52.3k
    fmt::memory_buffer debug_string_buffer;
461
462
52.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
463
52.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
464
52.3k
    return fmt::to_string(debug_string_buffer);
465
52.3k
}
466
467
52.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
468
52.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
469
52.2k
}
470
471
351k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
472
351k
    std::string op_name = "UNKNOWN_SINK";
473
351k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
474
475
351k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
476
351k
        op_name = it->second;
477
351k
    }
478
351k
    _name = op_name + "_OPERATOR";
479
351k
    return Status::OK();
480
351k
}
481
482
173k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
483
173k
    std::string op_name = print_plan_node_type(tnode.node_type);
484
173k
    _nereids_id = tnode.nereids_id;
485
173k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
486
173k
    _name = substr + "_SINK_OPERATOR";
487
173k
    return Status::OK();
488
173k
}
489
490
template <typename LocalStateType>
491
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
492
1.88M
                                                            LocalSinkStateInfo& info) {
493
1.88M
    auto local_state = LocalStateType::create_unique(this, state);
494
1.88M
    RETURN_IF_ERROR(local_state->init(state, info));
495
1.88M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
1.88M
    return Status::OK();
497
1.88M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
183k
                                                            LocalSinkStateInfo& info) {
493
183k
    auto local_state = LocalStateType::create_unique(this, state);
494
183k
    RETURN_IF_ERROR(local_state->init(state, info));
495
183k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
183k
    return Status::OK();
497
183k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
375k
                                                            LocalSinkStateInfo& info) {
493
375k
    auto local_state = LocalStateType::create_unique(this, state);
494
375k
    RETURN_IF_ERROR(local_state->init(state, info));
495
375k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
375k
    return Status::OK();
497
375k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
3
                                                            LocalSinkStateInfo& info) {
493
3
    auto local_state = LocalStateType::create_unique(this, state);
494
3
    RETURN_IF_ERROR(local_state->init(state, info));
495
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
3
    return Status::OK();
497
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
336
                                                            LocalSinkStateInfo& info) {
493
336
    auto local_state = LocalStateType::create_unique(this, state);
494
336
    RETURN_IF_ERROR(local_state->init(state, info));
495
336
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
336
    return Status::OK();
497
336
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
66.9k
                                                            LocalSinkStateInfo& info) {
493
66.9k
    auto local_state = LocalStateType::create_unique(this, state);
494
66.9k
    RETURN_IF_ERROR(local_state->init(state, info));
495
66.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
66.9k
    return Status::OK();
497
66.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
126
                                                            LocalSinkStateInfo& info) {
493
126
    auto local_state = LocalStateType::create_unique(this, state);
494
126
    RETURN_IF_ERROR(local_state->init(state, info));
495
126
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
126
    return Status::OK();
497
126
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
10.2k
                                                            LocalSinkStateInfo& info) {
493
10.2k
    auto local_state = LocalStateType::create_unique(this, state);
494
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
495
10.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
10.2k
    return Status::OK();
497
10.2k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
18
                                                            LocalSinkStateInfo& info) {
493
18
    auto local_state = LocalStateType::create_unique(this, state);
494
18
    RETURN_IF_ERROR(local_state->init(state, info));
495
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
18
    return Status::OK();
497
18
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
191k
                                                            LocalSinkStateInfo& info) {
493
191k
    auto local_state = LocalStateType::create_unique(this, state);
494
191k
    RETURN_IF_ERROR(local_state->init(state, info));
495
191k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
191k
    return Status::OK();
497
191k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
29
                                                            LocalSinkStateInfo& info) {
493
29
    auto local_state = LocalStateType::create_unique(this, state);
494
29
    RETURN_IF_ERROR(local_state->init(state, info));
495
29
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
29
    return Status::OK();
497
29
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
319k
                                                            LocalSinkStateInfo& info) {
493
319k
    auto local_state = LocalStateType::create_unique(this, state);
494
319k
    RETURN_IF_ERROR(local_state->init(state, info));
495
319k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
319k
    return Status::OK();
497
319k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
122k
                                                            LocalSinkStateInfo& info) {
493
122k
    auto local_state = LocalStateType::create_unique(this, state);
494
122k
    RETURN_IF_ERROR(local_state->init(state, info));
495
122k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
122k
    return Status::OK();
497
122k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
622
                                                            LocalSinkStateInfo& info) {
493
622
    auto local_state = LocalStateType::create_unique(this, state);
494
622
    RETURN_IF_ERROR(local_state->init(state, info));
495
622
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
622
    return Status::OK();
497
622
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
583k
                                                            LocalSinkStateInfo& info) {
493
583k
    auto local_state = LocalStateType::create_unique(this, state);
494
583k
    RETURN_IF_ERROR(local_state->init(state, info));
495
583k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
583k
    return Status::OK();
497
583k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
6.76k
                                                            LocalSinkStateInfo& info) {
493
6.76k
    auto local_state = LocalStateType::create_unique(this, state);
494
6.76k
    RETURN_IF_ERROR(local_state->init(state, info));
495
6.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
6.76k
    return Status::OK();
497
6.76k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
6.98k
                                                            LocalSinkStateInfo& info) {
493
6.98k
    auto local_state = LocalStateType::create_unique(this, state);
494
6.98k
    RETURN_IF_ERROR(local_state->init(state, info));
495
6.98k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
6.98k
    return Status::OK();
497
6.98k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
2.50k
                                                            LocalSinkStateInfo& info) {
493
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
494
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
495
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
2.50k
    return Status::OK();
497
2.50k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
352
                                                            LocalSinkStateInfo& info) {
493
352
    auto local_state = LocalStateType::create_unique(this, state);
494
352
    RETURN_IF_ERROR(local_state->init(state, info));
495
352
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
352
    return Status::OK();
497
352
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
4.61k
                                                            LocalSinkStateInfo& info) {
493
4.61k
    auto local_state = LocalStateType::create_unique(this, state);
494
4.61k
    RETURN_IF_ERROR(local_state->init(state, info));
495
4.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
4.61k
    return Status::OK();
497
4.61k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
2.49k
                                                            LocalSinkStateInfo& info) {
493
2.49k
    auto local_state = LocalStateType::create_unique(this, state);
494
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
495
2.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
2.49k
    return Status::OK();
497
2.49k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
2.40k
                                                            LocalSinkStateInfo& info) {
493
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
494
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
495
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
2.40k
    return Status::OK();
497
2.40k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
2.44k
                                                            LocalSinkStateInfo& info) {
493
2.44k
    auto local_state = LocalStateType::create_unique(this, state);
494
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
495
2.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
2.44k
    return Status::OK();
497
2.44k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
1
                                                            LocalSinkStateInfo& info) {
493
1
    auto local_state = LocalStateType::create_unique(this, state);
494
1
    RETURN_IF_ERROR(local_state->init(state, info));
495
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
1
    return Status::OK();
497
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
165
                                                            LocalSinkStateInfo& info) {
493
165
    auto local_state = LocalStateType::create_unique(this, state);
494
165
    RETURN_IF_ERROR(local_state->init(state, info));
495
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
165
    return Status::OK();
497
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
107
                                                            LocalSinkStateInfo& info) {
493
107
    auto local_state = LocalStateType::create_unique(this, state);
494
107
    RETURN_IF_ERROR(local_state->init(state, info));
495
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
107
    return Status::OK();
497
107
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
105
                                                            LocalSinkStateInfo& info) {
493
105
    auto local_state = LocalStateType::create_unique(this, state);
494
105
    RETURN_IF_ERROR(local_state->init(state, info));
495
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
105
    return Status::OK();
497
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
150
                                                            LocalSinkStateInfo& info) {
493
150
    auto local_state = LocalStateType::create_unique(this, state);
494
150
    RETURN_IF_ERROR(local_state->init(state, info));
495
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
150
    return Status::OK();
497
150
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
150
                                                            LocalSinkStateInfo& info) {
493
150
    auto local_state = LocalStateType::create_unique(this, state);
494
150
    RETURN_IF_ERROR(local_state->init(state, info));
495
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
150
    return Status::OK();
497
150
}
498
499
template <typename LocalStateType>
500
1.53M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
0
                                 LocalExchangeSharedState>) {
503
0
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
0
                                        MultiCastSharedState>) {
506
0
        throw Exception(Status::FatalError("should not reach here!"));
507
1.53M
    } else {
508
1.53M
        auto ss = LocalStateType::SharedStateType::create_shared();
509
1.53M
        ss->id = operator_id();
510
1.53M
        for (auto& dest : dests_id()) {
511
1.53M
            ss->related_op_ids.insert(dest);
512
1.53M
        }
513
1.53M
        return ss;
514
1.53M
    }
515
1.53M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
171k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
171k
    } else {
508
171k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
171k
        ss->id = operator_id();
510
171k
        for (auto& dest : dests_id()) {
511
171k
            ss->related_op_ids.insert(dest);
512
171k
        }
513
171k
        return ss;
514
171k
    }
515
171k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
375k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
375k
    } else {
508
375k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
375k
        ss->id = operator_id();
510
375k
        for (auto& dest : dests_id()) {
511
374k
            ss->related_op_ids.insert(dest);
512
374k
        }
513
375k
        return ss;
514
375k
    }
515
375k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
3
    } else {
508
3
        auto ss = LocalStateType::SharedStateType::create_shared();
509
3
        ss->id = operator_id();
510
3
        for (auto& dest : dests_id()) {
511
3
            ss->related_op_ids.insert(dest);
512
3
        }
513
3
        return ss;
514
3
    }
515
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
337
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
337
    } else {
508
337
        auto ss = LocalStateType::SharedStateType::create_shared();
509
337
        ss->id = operator_id();
510
337
        for (auto& dest : dests_id()) {
511
336
            ss->related_op_ids.insert(dest);
512
336
        }
513
337
        return ss;
514
337
    }
515
337
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
66.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
66.1k
    } else {
508
66.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
66.1k
        ss->id = operator_id();
510
66.1k
        for (auto& dest : dests_id()) {
511
66.0k
            ss->related_op_ids.insert(dest);
512
66.0k
        }
513
66.1k
        return ss;
514
66.1k
    }
515
66.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
500
126
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
126
    } else {
508
126
        auto ss = LocalStateType::SharedStateType::create_shared();
509
126
        ss->id = operator_id();
510
126
        for (auto& dest : dests_id()) {
511
126
            ss->related_op_ids.insert(dest);
512
126
        }
513
126
        return ss;
514
126
    }
515
126
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
10.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
10.2k
    } else {
508
10.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
10.2k
        ss->id = operator_id();
510
10.2k
        for (auto& dest : dests_id()) {
511
10.2k
            ss->related_op_ids.insert(dest);
512
10.2k
        }
513
10.2k
        return ss;
514
10.2k
    }
515
10.2k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
18
    } else {
508
18
        auto ss = LocalStateType::SharedStateType::create_shared();
509
18
        ss->id = operator_id();
510
18
        for (auto& dest : dests_id()) {
511
18
            ss->related_op_ids.insert(dest);
512
18
        }
513
18
        return ss;
514
18
    }
515
18
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
191k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
191k
    } else {
508
191k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
191k
        ss->id = operator_id();
510
191k
        for (auto& dest : dests_id()) {
511
191k
            ss->related_op_ids.insert(dest);
512
191k
        }
513
191k
        return ss;
514
191k
    }
515
191k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
31
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
31
    } else {
508
31
        auto ss = LocalStateType::SharedStateType::create_shared();
509
31
        ss->id = operator_id();
510
31
        for (auto& dest : dests_id()) {
511
31
            ss->related_op_ids.insert(dest);
512
31
        }
513
31
        return ss;
514
31
    }
515
31
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
122k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
122k
    } else {
508
122k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
122k
        ss->id = operator_id();
510
122k
        for (auto& dest : dests_id()) {
511
122k
            ss->related_op_ids.insert(dest);
512
122k
        }
513
122k
        return ss;
514
122k
    }
515
122k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
621
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
621
    } else {
508
621
        auto ss = LocalStateType::SharedStateType::create_shared();
509
621
        ss->id = operator_id();
510
621
        for (auto& dest : dests_id()) {
511
621
            ss->related_op_ids.insert(dest);
512
621
        }
513
621
        return ss;
514
621
    }
515
621
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
583k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
583k
    } else {
508
583k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
583k
        ss->id = operator_id();
510
583k
        for (auto& dest : dests_id()) {
511
582k
            ss->related_op_ids.insert(dest);
512
582k
        }
513
583k
        return ss;
514
583k
    }
515
583k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
6.76k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
6.76k
    } else {
508
6.76k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
6.76k
        ss->id = operator_id();
510
6.76k
        for (auto& dest : dests_id()) {
511
6.75k
            ss->related_op_ids.insert(dest);
512
6.75k
        }
513
6.76k
        return ss;
514
6.76k
    }
515
6.76k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
453
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
453
    } else {
508
453
        auto ss = LocalStateType::SharedStateType::create_shared();
509
453
        ss->id = operator_id();
510
453
        for (auto& dest : dests_id()) {
511
451
            ss->related_op_ids.insert(dest);
512
451
        }
513
453
        return ss;
514
453
    }
515
453
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
500
2.40k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
2.40k
    } else {
508
2.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
2.40k
        ss->id = operator_id();
510
2.40k
        for (auto& dest : dests_id()) {
511
2.40k
            ss->related_op_ids.insert(dest);
512
2.40k
        }
513
2.40k
        return ss;
514
2.40k
    }
515
2.40k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
500
2.44k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
2.44k
    } else {
508
2.44k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
2.44k
        ss->id = operator_id();
510
2.44k
        for (auto& dest : dests_id()) {
511
2.43k
            ss->related_op_ids.insert(dest);
512
2.43k
        }
513
2.44k
        return ss;
514
2.44k
    }
515
2.44k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
165
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
165
    } else {
508
165
        auto ss = LocalStateType::SharedStateType::create_shared();
509
165
        ss->id = operator_id();
510
165
        for (auto& dest : dests_id()) {
511
165
            ss->related_op_ids.insert(dest);
512
165
        }
513
165
        return ss;
514
165
    }
515
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
105
    } else {
508
105
        auto ss = LocalStateType::SharedStateType::create_shared();
509
105
        ss->id = operator_id();
510
105
        for (auto& dest : dests_id()) {
511
105
            ss->related_op_ids.insert(dest);
512
105
        }
513
105
        return ss;
514
105
    }
515
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
516
517
template <typename LocalStateType>
518
2.45M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
2.45M
    auto local_state = LocalStateType::create_unique(state, this);
520
2.45M
    RETURN_IF_ERROR(local_state->init(state, info));
521
2.45M
    state->emplace_local_state(operator_id(), std::move(local_state));
522
2.45M
    return Status::OK();
523
2.45M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
135k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
135k
    auto local_state = LocalStateType::create_unique(state, this);
520
135k
    RETURN_IF_ERROR(local_state->init(state, info));
521
135k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
135k
    return Status::OK();
523
135k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
314k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
314k
    auto local_state = LocalStateType::create_unique(state, this);
520
314k
    RETURN_IF_ERROR(local_state->init(state, info));
521
314k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
314k
    return Status::OK();
523
314k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
77
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
77
    auto local_state = LocalStateType::create_unique(state, this);
520
77
    RETURN_IF_ERROR(local_state->init(state, info));
521
77
    state->emplace_local_state(operator_id(), std::move(local_state));
522
77
    return Status::OK();
523
77
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
2.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
2.67k
    auto local_state = LocalStateType::create_unique(state, this);
520
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
521
2.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
2.67k
    return Status::OK();
523
2.67k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
10.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
10.2k
    auto local_state = LocalStateType::create_unique(state, this);
520
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
521
10.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
10.2k
    return Status::OK();
523
10.2k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
12.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
12.5k
    auto local_state = LocalStateType::create_unique(state, this);
520
12.5k
    RETURN_IF_ERROR(local_state->init(state, info));
521
12.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
12.5k
    return Status::OK();
523
12.5k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
23
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
23
    auto local_state = LocalStateType::create_unique(state, this);
520
23
    RETURN_IF_ERROR(local_state->init(state, info));
521
23
    state->emplace_local_state(operator_id(), std::move(local_state));
522
23
    return Status::OK();
523
23
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
178k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
178k
    auto local_state = LocalStateType::create_unique(state, this);
520
178k
    RETURN_IF_ERROR(local_state->init(state, info));
521
178k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
178k
    return Status::OK();
523
178k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
122k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
122k
    auto local_state = LocalStateType::create_unique(state, this);
520
122k
    RETURN_IF_ERROR(local_state->init(state, info));
521
122k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
122k
    return Status::OK();
523
122k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
612
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
612
    auto local_state = LocalStateType::create_unique(state, this);
520
612
    RETURN_IF_ERROR(local_state->init(state, info));
521
612
    state->emplace_local_state(operator_id(), std::move(local_state));
522
612
    return Status::OK();
523
612
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
4.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
4.33k
    auto local_state = LocalStateType::create_unique(state, this);
520
4.33k
    RETURN_IF_ERROR(local_state->init(state, info));
521
4.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
4.33k
    return Status::OK();
523
4.33k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
424k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
424k
    auto local_state = LocalStateType::create_unique(state, this);
520
424k
    RETURN_IF_ERROR(local_state->init(state, info));
521
424k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
424k
    return Status::OK();
523
424k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
1.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
1.48k
    auto local_state = LocalStateType::create_unique(state, this);
520
1.48k
    RETURN_IF_ERROR(local_state->init(state, info));
521
1.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
1.48k
    return Status::OK();
523
1.48k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
6.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
6.60k
    auto local_state = LocalStateType::create_unique(state, this);
520
6.60k
    RETURN_IF_ERROR(local_state->init(state, info));
521
6.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
6.60k
    return Status::OK();
523
6.60k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
21
    auto local_state = LocalStateType::create_unique(state, this);
520
21
    RETURN_IF_ERROR(local_state->init(state, info));
521
21
    state->emplace_local_state(operator_id(), std::move(local_state));
522
21
    return Status::OK();
523
21
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
1.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
520
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
521
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
1.55k
    return Status::OK();
523
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
51.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
51.1k
    auto local_state = LocalStateType::create_unique(state, this);
520
51.1k
    RETURN_IF_ERROR(local_state->init(state, info));
521
51.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
51.1k
    return Status::OK();
523
51.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
6.76k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
6.76k
    auto local_state = LocalStateType::create_unique(state, this);
520
6.76k
    RETURN_IF_ERROR(local_state->init(state, info));
521
6.76k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
6.76k
    return Status::OK();
523
6.76k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
351
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
351
    auto local_state = LocalStateType::create_unique(state, this);
520
351
    RETURN_IF_ERROR(local_state->init(state, info));
521
351
    state->emplace_local_state(operator_id(), std::move(local_state));
522
351
    return Status::OK();
523
351
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
2.40k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
2.40k
    auto local_state = LocalStateType::create_unique(state, this);
520
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
521
2.40k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
2.40k
    return Status::OK();
523
2.40k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
2.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
2.45k
    auto local_state = LocalStateType::create_unique(state, this);
520
2.45k
    RETURN_IF_ERROR(local_state->init(state, info));
521
2.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
2.45k
    return Status::OK();
523
2.45k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
267
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
267
    auto local_state = LocalStateType::create_unique(state, this);
520
267
    RETURN_IF_ERROR(local_state->init(state, info));
521
267
    state->emplace_local_state(operator_id(), std::move(local_state));
522
267
    return Status::OK();
523
267
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
1.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
520
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
521
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
1.54k
    return Status::OK();
523
1.54k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
5.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
5.02k
    auto local_state = LocalStateType::create_unique(state, this);
520
5.02k
    RETURN_IF_ERROR(local_state->init(state, info));
521
5.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
5.02k
    return Status::OK();
523
5.02k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
671k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
671k
    auto local_state = LocalStateType::create_unique(state, this);
520
671k
    RETURN_IF_ERROR(local_state->init(state, info));
521
671k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
671k
    return Status::OK();
523
671k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
108
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
108
    auto local_state = LocalStateType::create_unique(state, this);
520
108
    RETURN_IF_ERROR(local_state->init(state, info));
521
108
    state->emplace_local_state(operator_id(), std::move(local_state));
522
108
    return Status::OK();
523
108
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
150
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
150
    auto local_state = LocalStateType::create_unique(state, this);
520
150
    RETURN_IF_ERROR(local_state->init(state, info));
521
150
    state->emplace_local_state(operator_id(), std::move(local_state));
522
150
    return Status::OK();
523
150
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
1.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
1.85k
    auto local_state = LocalStateType::create_unique(state, this);
520
1.85k
    RETURN_IF_ERROR(local_state->init(state, info));
521
1.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
1.85k
    return Status::OK();
523
1.85k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
681
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
681
    auto local_state = LocalStateType::create_unique(state, this);
520
681
    RETURN_IF_ERROR(local_state->init(state, info));
521
681
    state->emplace_local_state(operator_id(), std::move(local_state));
522
681
    return Status::OK();
523
681
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
1.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
1.09k
    auto local_state = LocalStateType::create_unique(state, this);
520
1.09k
    RETURN_IF_ERROR(local_state->init(state, info));
521
1.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
1.09k
    return Status::OK();
523
1.09k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
7.84k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
7.84k
    auto local_state = LocalStateType::create_unique(state, this);
520
7.84k
    RETURN_IF_ERROR(local_state->init(state, info));
521
7.84k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
7.84k
    return Status::OK();
523
7.84k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
489k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
489k
    auto local_state = LocalStateType::create_unique(state, this);
520
489k
    RETURN_IF_ERROR(local_state->init(state, info));
521
489k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
489k
    return Status::OK();
523
489k
}
524
525
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
526
                                                         RuntimeState* state)
527
1.88M
        : _parent(parent), _state(state) {}
528
529
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
530
2.45M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
531
532
template <typename SharedStateArg>
533
2.45M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
2.45M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
2.45M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
2.45M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
2.45M
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
2.45M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
2.45M
    _operator_profile->add_child(_common_profile.get(), true);
542
2.45M
    _operator_profile->add_child(_custom_profile.get(), true);
543
2.45M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
2.45M
    if constexpr (!is_fake_shared) {
545
1.19M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
683k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
683k
                                    .first.get()
548
683k
                                    ->template cast<SharedStateArg>();
549
550
683k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
683k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
683k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
683k
        } else if (info.shared_state) {
554
463k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
0
                DCHECK(false);
556
0
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
463k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
463k
            _dependency = _shared_state->create_source_dependency(
561
463k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
463k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
463k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
463k
        } else {
565
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
18.4E
                DCHECK(false);
567
18.4E
            }
568
52.6k
        }
569
1.19M
    }
570
571
2.45M
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
2.45M
    _rows_returned_counter =
576
2.45M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
2.45M
    _blocks_returned_counter =
578
2.45M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
2.45M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
2.45M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
2.45M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
2.45M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
2.45M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
2.45M
    _memory_used_counter =
585
2.45M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
2.45M
    _common_profile->add_info_string("IsColocate",
587
2.45M
                                     std::to_string(_parent->is_colocated_operator()));
588
2.45M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
2.45M
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
2.45M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
2.45M
    return Status::OK();
592
2.45M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
135k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
135k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
135k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
135k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
135k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
135k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
135k
    _operator_profile->add_child(_common_profile.get(), true);
542
135k
    _operator_profile->add_child(_custom_profile.get(), true);
543
135k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
135k
    if constexpr (!is_fake_shared) {
545
135k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
12.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
12.3k
                                    .first.get()
548
12.3k
                                    ->template cast<SharedStateArg>();
549
550
12.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
12.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
12.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
122k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
121k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
121k
            _dependency = _shared_state->create_source_dependency(
561
121k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
121k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
121k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
121k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
951
        }
569
135k
    }
570
571
135k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
135k
    _rows_returned_counter =
576
135k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
135k
    _blocks_returned_counter =
578
135k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
135k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
135k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
135k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
135k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
135k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
135k
    _memory_used_counter =
585
135k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
135k
    _common_profile->add_info_string("IsColocate",
587
135k
                                     std::to_string(_parent->is_colocated_operator()));
588
135k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
135k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
135k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
135k
    return Status::OK();
592
135k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
1
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
1
    _operator_profile->add_child(_common_profile.get(), true);
542
1
    _operator_profile->add_child(_custom_profile.get(), true);
543
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
1
    if constexpr (!is_fake_shared) {
545
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
1
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
1
            _dependency = _shared_state->create_source_dependency(
561
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
1
    }
570
571
1
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
1
    _rows_returned_counter =
576
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
1
    _blocks_returned_counter =
578
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
1
    _memory_used_counter =
585
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
1
    _common_profile->add_info_string("IsColocate",
587
1
                                     std::to_string(_parent->is_colocated_operator()));
588
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
1
    return Status::OK();
592
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
190k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
190k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
190k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
190k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
190k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
190k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
190k
    _operator_profile->add_child(_common_profile.get(), true);
542
190k
    _operator_profile->add_child(_custom_profile.get(), true);
543
190k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
190k
    if constexpr (!is_fake_shared) {
545
190k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
190k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
187k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
187k
            _dependency = _shared_state->create_source_dependency(
561
187k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
187k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
187k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
187k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
3.11k
        }
569
190k
    }
570
571
190k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
190k
    _rows_returned_counter =
576
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
190k
    _blocks_returned_counter =
578
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
190k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
190k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
190k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
190k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
190k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
190k
    _memory_used_counter =
585
190k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
190k
    _common_profile->add_info_string("IsColocate",
587
190k
                                     std::to_string(_parent->is_colocated_operator()));
588
190k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
190k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
190k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
190k
    return Status::OK();
592
190k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
23
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
23
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
23
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
23
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
23
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
23
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
23
    _operator_profile->add_child(_common_profile.get(), true);
542
23
    _operator_profile->add_child(_custom_profile.get(), true);
543
23
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
23
    if constexpr (!is_fake_shared) {
545
23
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
23
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
23
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
23
            _dependency = _shared_state->create_source_dependency(
561
23
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
23
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
23
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
23
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
23
    }
570
571
23
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
23
    _rows_returned_counter =
576
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
23
    _blocks_returned_counter =
578
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
23
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
23
    _memory_used_counter =
585
23
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
23
    _common_profile->add_info_string("IsColocate",
587
23
                                     std::to_string(_parent->is_colocated_operator()));
588
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
23
    return Status::OK();
592
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
6.51k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
6.51k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
6.51k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
6.51k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
6.51k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
6.51k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
6.51k
    _operator_profile->add_child(_common_profile.get(), true);
542
6.51k
    _operator_profile->add_child(_custom_profile.get(), true);
543
6.51k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
6.51k
    if constexpr (!is_fake_shared) {
545
6.51k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
6.53k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
6.53k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
6.53k
            _dependency = _shared_state->create_source_dependency(
561
6.53k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
6.53k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
6.53k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
18.4E
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
18.4E
        }
569
6.51k
    }
570
571
6.51k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
6.51k
    _rows_returned_counter =
576
6.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
6.51k
    _blocks_returned_counter =
578
6.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
6.51k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
6.51k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
6.51k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
6.51k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
6.51k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
6.51k
    _memory_used_counter =
585
6.51k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
6.51k
    _common_profile->add_info_string("IsColocate",
587
6.51k
                                     std::to_string(_parent->is_colocated_operator()));
588
6.51k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
6.51k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
6.51k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
6.51k
    return Status::OK();
592
6.51k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
10.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
10.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
10.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
10.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
10.2k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
10.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
10.2k
    _operator_profile->add_child(_common_profile.get(), true);
542
10.2k
    _operator_profile->add_child(_custom_profile.get(), true);
543
10.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
10.2k
    if constexpr (!is_fake_shared) {
545
10.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
10.2k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
10.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
10.1k
            _dependency = _shared_state->create_source_dependency(
561
10.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
10.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
10.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
10.1k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
106
        }
569
10.2k
    }
570
571
10.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
10.2k
    _rows_returned_counter =
576
10.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
10.2k
    _blocks_returned_counter =
578
10.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
10.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
10.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
10.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
10.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
10.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
10.2k
    _memory_used_counter =
585
10.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
10.2k
    _common_profile->add_info_string("IsColocate",
587
10.2k
                                     std::to_string(_parent->is_colocated_operator()));
588
10.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
10.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
10.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
10.2k
    return Status::OK();
592
10.2k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
122k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
122k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
122k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
122k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
122k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
122k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
122k
    _operator_profile->add_child(_common_profile.get(), true);
542
122k
    _operator_profile->add_child(_custom_profile.get(), true);
543
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
122k
    if constexpr (!is_fake_shared) {
545
122k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
122k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
121k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
121k
            _dependency = _shared_state->create_source_dependency(
561
121k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
121k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
121k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
121k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
1.00k
        }
569
122k
    }
570
571
122k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
122k
    _rows_returned_counter =
576
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
122k
    _blocks_returned_counter =
578
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
122k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
122k
    _memory_used_counter =
585
122k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
122k
    _common_profile->add_info_string("IsColocate",
587
122k
                                     std::to_string(_parent->is_colocated_operator()));
588
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
122k
    return Status::OK();
592
122k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
612
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
612
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
612
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
612
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
612
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
612
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
612
    _operator_profile->add_child(_common_profile.get(), true);
542
612
    _operator_profile->add_child(_custom_profile.get(), true);
543
612
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
612
    if constexpr (!is_fake_shared) {
545
612
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
612
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
612
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
612
            _dependency = _shared_state->create_source_dependency(
561
612
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
612
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
612
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
612
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
612
    }
570
571
612
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
612
    _rows_returned_counter =
576
612
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
612
    _blocks_returned_counter =
578
612
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
612
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
612
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
612
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
612
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
612
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
612
    _memory_used_counter =
585
612
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
612
    _common_profile->add_info_string("IsColocate",
587
612
                                     std::to_string(_parent->is_colocated_operator()));
588
612
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
612
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
612
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
612
    return Status::OK();
592
612
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
1.25M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
1.25M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
1.25M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
1.25M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
1.25M
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
1.25M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
1.25M
    _operator_profile->add_child(_common_profile.get(), true);
542
1.25M
    _operator_profile->add_child(_custom_profile.get(), true);
543
1.25M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
    if constexpr (!is_fake_shared) {
545
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
                                    .first.get()
548
                                    ->template cast<SharedStateArg>();
549
550
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
            _dependency = _shared_state->create_source_dependency(
561
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
        }
569
    }
570
571
1.25M
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
1.25M
    _rows_returned_counter =
576
1.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
1.25M
    _blocks_returned_counter =
578
1.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
1.25M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
1.25M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
1.25M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
1.25M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
1.25M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
1.25M
    _memory_used_counter =
585
1.25M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
1.25M
    _common_profile->add_info_string("IsColocate",
587
1.25M
                                     std::to_string(_parent->is_colocated_operator()));
588
1.25M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
1.25M
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
1.25M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
1.25M
    return Status::OK();
592
1.25M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
50.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
50.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
50.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
50.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
50.9k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
50.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
50.9k
    _operator_profile->add_child(_common_profile.get(), true);
542
50.9k
    _operator_profile->add_child(_custom_profile.get(), true);
543
50.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
50.9k
    if constexpr (!is_fake_shared) {
545
50.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
50.9k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
3.32k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
3.32k
            _dependency = _shared_state->create_source_dependency(
561
3.32k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
3.32k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
3.32k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
47.6k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
47.6k
        }
569
50.9k
    }
570
571
50.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
50.9k
    _rows_returned_counter =
576
50.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
50.9k
    _blocks_returned_counter =
578
50.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
50.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
50.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
50.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
50.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
50.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
50.9k
    _memory_used_counter =
585
50.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
50.9k
    _common_profile->add_info_string("IsColocate",
587
50.9k
                                     std::to_string(_parent->is_colocated_operator()));
588
50.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
50.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
50.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
50.9k
    return Status::OK();
592
50.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
111
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
111
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
111
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
111
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
111
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
111
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
111
    _operator_profile->add_child(_common_profile.get(), true);
542
111
    _operator_profile->add_child(_custom_profile.get(), true);
543
111
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
111
    if constexpr (!is_fake_shared) {
545
111
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
111
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
109
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
109
            _dependency = _shared_state->create_source_dependency(
561
109
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
109
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
109
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
109
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
2
        }
569
111
    }
570
571
111
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
111
    _rows_returned_counter =
576
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
111
    _blocks_returned_counter =
578
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
111
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
111
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
111
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
111
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
111
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
111
    _memory_used_counter =
585
111
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
111
    _common_profile->add_info_string("IsColocate",
587
111
                                     std::to_string(_parent->is_colocated_operator()));
588
111
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
111
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
111
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
111
    return Status::OK();
592
111
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
6.77k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
6.77k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
6.77k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
6.77k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
6.77k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
6.77k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
6.77k
    _operator_profile->add_child(_common_profile.get(), true);
542
6.77k
    _operator_profile->add_child(_custom_profile.get(), true);
543
6.77k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
6.77k
    if constexpr (!is_fake_shared) {
545
6.77k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
6.77k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
6.75k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
6.75k
            _dependency = _shared_state->create_source_dependency(
561
6.75k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
6.75k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
6.75k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
6.75k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
19
        }
569
6.77k
    }
570
571
6.77k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
6.77k
    _rows_returned_counter =
576
6.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
6.77k
    _blocks_returned_counter =
578
6.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
6.77k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
6.77k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
6.77k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
6.77k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
6.77k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
6.77k
    _memory_used_counter =
585
6.77k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
6.77k
    _common_profile->add_info_string("IsColocate",
587
6.77k
                                     std::to_string(_parent->is_colocated_operator()));
588
6.77k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
6.77k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
6.77k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
6.77k
    return Status::OK();
592
6.77k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
449
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
449
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
449
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
449
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
449
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
449
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
449
    _operator_profile->add_child(_common_profile.get(), true);
542
449
    _operator_profile->add_child(_custom_profile.get(), true);
543
449
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
449
    if constexpr (!is_fake_shared) {
545
449
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
449
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
448
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
448
            _dependency = _shared_state->create_source_dependency(
561
448
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
448
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
448
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
448
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
1
        }
569
449
    }
570
571
449
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
449
    _rows_returned_counter =
576
449
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
449
    _blocks_returned_counter =
578
449
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
449
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
449
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
449
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
449
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
449
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
449
    _memory_used_counter =
585
449
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
449
    _common_profile->add_info_string("IsColocate",
587
449
                                     std::to_string(_parent->is_colocated_operator()));
588
449
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
449
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
449
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
449
    return Status::OK();
592
449
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
4.86k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
4.86k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
4.86k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
4.86k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
4.86k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
4.86k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
4.86k
    _operator_profile->add_child(_common_profile.get(), true);
542
4.86k
    _operator_profile->add_child(_custom_profile.get(), true);
543
4.86k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
4.86k
    if constexpr (!is_fake_shared) {
545
4.86k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
4.86k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
4.85k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
4.85k
            _dependency = _shared_state->create_source_dependency(
561
4.85k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
4.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
4.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
4.85k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
12
        }
569
4.86k
    }
570
571
4.86k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
4.86k
    _rows_returned_counter =
576
4.86k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
4.86k
    _blocks_returned_counter =
578
4.86k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
4.86k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
4.86k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
4.86k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
4.86k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
4.86k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
4.86k
    _memory_used_counter =
585
4.86k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
4.86k
    _common_profile->add_info_string("IsColocate",
587
4.86k
                                     std::to_string(_parent->is_colocated_operator()));
588
4.86k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
4.86k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
4.86k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
4.86k
    return Status::OK();
592
4.86k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
670k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
670k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
670k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
670k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
670k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
670k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
670k
    _operator_profile->add_child(_common_profile.get(), true);
542
670k
    _operator_profile->add_child(_custom_profile.get(), true);
543
670k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
670k
    if constexpr (!is_fake_shared) {
545
670k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
670k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
670k
                                    .first.get()
548
670k
                                    ->template cast<SharedStateArg>();
549
550
670k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
670k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
670k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
18.4E
        } else if (info.shared_state) {
554
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
0
                DCHECK(false);
556
0
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
0
            _dependency = _shared_state->create_source_dependency(
561
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
18.4E
        } else {
565
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
18.4E
                DCHECK(false);
567
18.4E
            }
568
18.4E
        }
569
670k
    }
570
571
670k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
670k
    _rows_returned_counter =
576
670k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
670k
    _blocks_returned_counter =
578
670k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
670k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
670k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
670k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
670k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
670k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
670k
    _memory_used_counter =
585
670k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
670k
    _common_profile->add_info_string("IsColocate",
587
670k
                                     std::to_string(_parent->is_colocated_operator()));
588
670k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
670k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
670k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
670k
    return Status::OK();
592
670k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
150
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
150
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
150
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
150
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
150
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
150
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
150
    _operator_profile->add_child(_common_profile.get(), true);
542
150
    _operator_profile->add_child(_custom_profile.get(), true);
543
150
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
150
    if constexpr (!is_fake_shared) {
545
150
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
150
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
150
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
150
            _dependency = _shared_state->create_source_dependency(
561
150
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
150
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
150
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
150
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
150
    }
570
571
150
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
150
    _rows_returned_counter =
576
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
150
    _blocks_returned_counter =
578
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
150
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
150
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
150
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
150
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
150
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
150
    _memory_used_counter =
585
150
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
150
    _common_profile->add_info_string("IsColocate",
587
150
                                     std::to_string(_parent->is_colocated_operator()));
588
150
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
150
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
150
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
150
    return Status::OK();
592
150
}
593
594
template <typename SharedStateArg>
595
2.46M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
2.46M
    _conjuncts.resize(_parent->_conjuncts.size());
597
2.46M
    _projections.resize(_parent->_projections.size());
598
2.79M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
332k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
332k
    }
601
5.03M
    for (size_t i = 0; i < _projections.size(); i++) {
602
2.56M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
2.56M
    }
604
2.46M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
2.47M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
5.86k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
37.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
31.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
31.6k
                    state, _intermediate_projections[i][j]));
610
31.6k
        }
611
5.86k
    }
612
2.46M
    return Status::OK();
613
2.46M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
135k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
135k
    _conjuncts.resize(_parent->_conjuncts.size());
597
135k
    _projections.resize(_parent->_projections.size());
598
137k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
1.47k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
1.47k
    }
601
718k
    for (size_t i = 0; i < _projections.size(); i++) {
602
582k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
582k
    }
604
135k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
136k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
568
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
4.95k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
4.38k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
4.38k
                    state, _intermediate_projections[i][j]));
610
4.38k
        }
611
568
    }
612
135k
    return Status::OK();
613
135k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
3
    _conjuncts.resize(_parent->_conjuncts.size());
597
3
    _projections.resize(_parent->_projections.size());
598
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
3
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
3
    return Status::OK();
613
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
191k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
191k
    _conjuncts.resize(_parent->_conjuncts.size());
597
191k
    _projections.resize(_parent->_projections.size());
598
191k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
210k
    for (size_t i = 0; i < _projections.size(); i++) {
602
18.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
18.7k
    }
604
191k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
191k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
191k
    return Status::OK();
613
191k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
22
    _conjuncts.resize(_parent->_conjuncts.size());
597
22
    _projections.resize(_parent->_projections.size());
598
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
22
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
22
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
22
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
22
    return Status::OK();
613
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
6.77k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
6.77k
    _conjuncts.resize(_parent->_conjuncts.size());
597
6.77k
    _projections.resize(_parent->_projections.size());
598
6.86k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
97
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
97
    }
601
34.5k
    for (size_t i = 0; i < _projections.size(); i++) {
602
27.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
27.7k
    }
604
6.77k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
6.79k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
19
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
168
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
149
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
149
                    state, _intermediate_projections[i][j]));
610
149
        }
611
19
    }
612
6.77k
    return Status::OK();
613
6.77k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
10.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
10.2k
    _conjuncts.resize(_parent->_conjuncts.size());
597
10.2k
    _projections.resize(_parent->_projections.size());
598
11.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
1.07k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
1.07k
    }
601
28.8k
    for (size_t i = 0; i < _projections.size(); i++) {
602
18.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
18.5k
    }
604
10.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
10.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
171
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
1.30k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
1.13k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
1.13k
                    state, _intermediate_projections[i][j]));
610
1.13k
        }
611
171
    }
612
10.2k
    return Status::OK();
613
10.2k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
122k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
122k
    _conjuncts.resize(_parent->_conjuncts.size());
597
122k
    _projections.resize(_parent->_projections.size());
598
124k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
1.89k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
1.89k
    }
601
441k
    for (size_t i = 0; i < _projections.size(); i++) {
602
319k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
319k
    }
604
122k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
122k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
128
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
913
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
785
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
785
                    state, _intermediate_projections[i][j]));
610
785
        }
611
128
    }
612
122k
    return Status::OK();
613
122k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
616
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
616
    _conjuncts.resize(_parent->_conjuncts.size());
597
616
    _projections.resize(_parent->_projections.size());
598
616
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
1.42k
    for (size_t i = 0; i < _projections.size(); i++) {
602
812
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
812
    }
604
616
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
616
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
616
    return Status::OK();
613
616
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
1.25M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
1.25M
    _conjuncts.resize(_parent->_conjuncts.size());
597
1.25M
    _projections.resize(_parent->_projections.size());
598
1.58M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
327k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
327k
    }
601
2.76M
    for (size_t i = 0; i < _projections.size(); i++) {
602
1.50M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
1.50M
    }
604
1.25M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
1.26M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
4.97k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
30.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
25.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
25.2k
                    state, _intermediate_projections[i][j]));
610
25.2k
        }
611
4.97k
    }
612
1.25M
    return Status::OK();
613
1.25M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
51.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
51.2k
    _conjuncts.resize(_parent->_conjuncts.size());
597
51.2k
    _projections.resize(_parent->_projections.size());
598
51.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
146k
    for (size_t i = 0; i < _projections.size(); i++) {
602
95.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
95.0k
    }
604
51.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
51.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
51.2k
    return Status::OK();
613
51.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
111
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
111
    _conjuncts.resize(_parent->_conjuncts.size());
597
111
    _projections.resize(_parent->_projections.size());
598
111
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
111
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
111
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
111
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
111
    return Status::OK();
613
111
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
6.78k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
6.78k
    _conjuncts.resize(_parent->_conjuncts.size());
597
6.78k
    _projections.resize(_parent->_projections.size());
598
7.99k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
1.21k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
1.21k
    }
601
6.78k
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
6.78k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
6.78k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
6.78k
    return Status::OK();
613
6.78k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
454
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
454
    _conjuncts.resize(_parent->_conjuncts.size());
597
454
    _projections.resize(_parent->_projections.size());
598
454
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
454
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
454
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
454
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
454
    return Status::OK();
613
454
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
4.86k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
4.86k
    _conjuncts.resize(_parent->_conjuncts.size());
597
4.86k
    _projections.resize(_parent->_projections.size());
598
4.86k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
4.86k
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
4.86k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
4.86k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
4.86k
    return Status::OK();
613
4.86k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
674k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
674k
    _conjuncts.resize(_parent->_conjuncts.size());
597
674k
    _projections.resize(_parent->_projections.size());
598
674k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
674k
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
674k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
674k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
674k
    return Status::OK();
613
674k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
150
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
150
    _conjuncts.resize(_parent->_conjuncts.size());
597
150
    _projections.resize(_parent->_projections.size());
598
157
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
7
    }
601
443
    for (size_t i = 0; i < _projections.size(); i++) {
602
293
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
293
    }
604
150
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
151
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
2
                    state, _intermediate_projections[i][j]));
610
2
        }
611
1
    }
612
150
    return Status::OK();
613
150
}
614
615
template <typename SharedStateArg>
616
8.08k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
8.08k
    if (_terminated) {
618
1
        return Status::OK();
619
1
    }
620
8.08k
    _terminated = true;
621
8.08k
    return Status::OK();
622
8.08k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
1.51k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
1.51k
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
1.51k
    _terminated = true;
621
1.51k
    return Status::OK();
622
1.51k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
298
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
298
    if (_terminated) {
618
1
        return Status::OK();
619
1
    }
620
297
    _terminated = true;
621
297
    return Status::OK();
622
298
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
216
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
216
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
216
    _terminated = true;
621
216
    return Status::OK();
622
216
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
588
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
588
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
588
    _terminated = true;
621
588
    return Status::OK();
622
588
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
4.55k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
4.55k
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
4.55k
    _terminated = true;
621
4.55k
    return Status::OK();
622
4.55k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
6
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
6
    _terminated = true;
621
6
    return Status::OK();
622
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
2
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
2
    _terminated = true;
621
2
    return Status::OK();
622
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
10
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
10
    _terminated = true;
621
10
    return Status::OK();
622
10
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
878
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
878
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
878
    _terminated = true;
621
878
    return Status::OK();
622
878
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
616
15
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
15
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
15
    _terminated = true;
621
15
    return Status::OK();
622
15
}
623
624
template <typename SharedStateArg>
625
2.68M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
2.68M
    if (_closed) {
627
222k
        return Status::OK();
628
222k
    }
629
2.46M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
1.20M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
1.20M
    }
632
2.46M
    _closed = true;
633
2.46M
    return Status::OK();
634
2.68M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
136k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
136k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
136k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
136k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
136k
    }
632
136k
    _closed = true;
633
136k
    return Status::OK();
634
136k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
3
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
3
    }
632
3
    _closed = true;
633
3
    return Status::OK();
634
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
381k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
381k
    if (_closed) {
627
190k
        return Status::OK();
628
190k
    }
629
190k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
190k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
190k
    }
632
190k
    _closed = true;
633
190k
    return Status::OK();
634
381k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
23
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
23
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
23
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
23
    }
632
23
    _closed = true;
633
23
    return Status::OK();
634
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
6.77k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
6.77k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
6.77k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
6.77k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
6.77k
    }
632
6.77k
    _closed = true;
633
6.77k
    return Status::OK();
634
6.77k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
20.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
20.6k
    if (_closed) {
627
10.4k
        return Status::OK();
628
10.4k
    }
629
10.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
10.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
10.2k
    }
632
10.2k
    _closed = true;
633
10.2k
    return Status::OK();
634
20.6k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
121k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
121k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
121k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
121k
    }
632
121k
    _closed = true;
633
121k
    return Status::OK();
634
121k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
609
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
609
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
609
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
609
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
609
    }
632
609
    _closed = true;
633
609
    return Status::OK();
634
609
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
1.27M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
1.27M
    if (_closed) {
627
15.4k
        return Status::OK();
628
15.4k
    }
629
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
    }
632
1.25M
    _closed = true;
633
1.25M
    return Status::OK();
634
1.27M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
51.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
51.2k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
51.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
51.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
51.2k
    }
632
51.2k
    _closed = true;
633
51.2k
    return Status::OK();
634
51.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
216
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
216
    if (_closed) {
627
108
        return Status::OK();
628
108
    }
629
108
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
108
    }
632
108
    _closed = true;
633
108
    return Status::OK();
634
216
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
6.76k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
6.76k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
6.76k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
6.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
6.76k
    }
632
6.76k
    _closed = true;
633
6.76k
    return Status::OK();
634
6.76k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
702
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
702
    if (_closed) {
627
352
        return Status::OK();
628
352
    }
629
350
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
350
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
350
    }
632
350
    _closed = true;
633
350
    return Status::OK();
634
702
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
9.73k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
9.73k
    if (_closed) {
627
4.88k
        return Status::OK();
628
4.88k
    }
629
4.85k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
4.85k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
4.85k
    }
632
4.85k
    _closed = true;
633
4.85k
    return Status::OK();
634
9.73k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
676k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
676k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
676k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
676k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
676k
    }
632
676k
    _closed = true;
633
676k
    return Status::OK();
634
676k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
303
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
303
    if (_closed) {
627
155
        return Status::OK();
628
155
    }
629
148
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
148
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
148
    }
632
148
    _closed = true;
633
148
    return Status::OK();
634
303
}
635
636
template <typename SharedState>
637
1.88M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
1.88M
    _operator_profile =
640
1.88M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
1.88M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
1.88M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
1.88M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
1.88M
    _operator_profile->add_child(_common_profile, true);
649
1.88M
    _operator_profile->add_child(_custom_profile, true);
650
651
1.88M
    _operator_profile->set_metadata(_parent->node_id());
652
1.88M
    _wait_for_finish_dependency_timer =
653
1.88M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
1.88M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.88M
    if constexpr (!is_fake_shared) {
656
1.30M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.30M
            info.shared_state_map.end()) {
658
332k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
319k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
319k
            }
661
332k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
332k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
332k
                                                  ? 0
664
332k
                                                  : info.task_idx]
665
332k
                                  .get();
666
332k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
967k
        } else {
668
967k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
95
                DCHECK(false);
670
95
            }
671
967k
            _shared_state = info.shared_state->template cast<SharedState>();
672
967k
            _dependency = _shared_state->create_sink_dependency(
673
967k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
967k
        }
675
1.30M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.30M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.30M
    }
678
679
1.88M
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
1.88M
    _rows_input_counter =
684
1.88M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
1.88M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
1.88M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
1.88M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
1.88M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
1.88M
    _memory_used_counter =
690
1.88M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
1.88M
    _common_profile->add_info_string("IsColocate",
692
1.88M
                                     std::to_string(_parent->is_colocated_operator()));
693
1.88M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
1.88M
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
1.88M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
1.88M
    return Status::OK();
697
1.88M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
183k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
183k
    _operator_profile =
640
183k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
183k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
183k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
183k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
183k
    _operator_profile->add_child(_common_profile, true);
649
183k
    _operator_profile->add_child(_custom_profile, true);
650
651
183k
    _operator_profile->set_metadata(_parent->node_id());
652
183k
    _wait_for_finish_dependency_timer =
653
183k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
183k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
183k
    if constexpr (!is_fake_shared) {
656
183k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
183k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
12.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
12.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
12.4k
                                                  ? 0
664
12.4k
                                                  : info.task_idx]
665
12.4k
                                  .get();
666
12.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
171k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
171k
            _shared_state = info.shared_state->template cast<SharedState>();
672
171k
            _dependency = _shared_state->create_sink_dependency(
673
171k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
171k
        }
675
183k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
183k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
183k
    }
678
679
183k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
183k
    _rows_input_counter =
684
183k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
183k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
183k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
183k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
183k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
183k
    _memory_used_counter =
690
183k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
183k
    _common_profile->add_info_string("IsColocate",
692
183k
                                     std::to_string(_parent->is_colocated_operator()));
693
183k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
183k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
183k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
183k
    return Status::OK();
697
183k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
2
    _operator_profile =
640
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
2
    _operator_profile->add_child(_common_profile, true);
649
2
    _operator_profile->add_child(_custom_profile, true);
650
651
2
    _operator_profile->set_metadata(_parent->node_id());
652
2
    _wait_for_finish_dependency_timer =
653
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2
    if constexpr (!is_fake_shared) {
656
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
2
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2
            _shared_state = info.shared_state->template cast<SharedState>();
672
2
            _dependency = _shared_state->create_sink_dependency(
673
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2
        }
675
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2
    }
678
679
2
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
2
    _rows_input_counter =
684
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
2
    _memory_used_counter =
690
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
2
    _common_profile->add_info_string("IsColocate",
692
2
                                     std::to_string(_parent->is_colocated_operator()));
693
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
2
    return Status::OK();
697
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
191k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
191k
    _operator_profile =
640
191k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
191k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
191k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
191k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
191k
    _operator_profile->add_child(_common_profile, true);
649
191k
    _operator_profile->add_child(_custom_profile, true);
650
651
191k
    _operator_profile->set_metadata(_parent->node_id());
652
191k
    _wait_for_finish_dependency_timer =
653
191k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
191k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
191k
    if constexpr (!is_fake_shared) {
656
191k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
191k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
191k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
191k
            _shared_state = info.shared_state->template cast<SharedState>();
672
191k
            _dependency = _shared_state->create_sink_dependency(
673
191k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
191k
        }
675
191k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
191k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
191k
    }
678
679
191k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
191k
    _rows_input_counter =
684
191k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
191k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
191k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
191k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
191k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
191k
    _memory_used_counter =
690
191k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
191k
    _common_profile->add_info_string("IsColocate",
692
191k
                                     std::to_string(_parent->is_colocated_operator()));
693
191k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
191k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
191k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
191k
    return Status::OK();
697
191k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
29
    _operator_profile =
640
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
29
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
29
    _operator_profile->add_child(_common_profile, true);
649
29
    _operator_profile->add_child(_custom_profile, true);
650
651
29
    _operator_profile->set_metadata(_parent->node_id());
652
29
    _wait_for_finish_dependency_timer =
653
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
29
    if constexpr (!is_fake_shared) {
656
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
29
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
29
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
29
            _shared_state = info.shared_state->template cast<SharedState>();
672
29
            _dependency = _shared_state->create_sink_dependency(
673
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
29
        }
675
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
29
    }
678
679
29
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
29
    _rows_input_counter =
684
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
29
    _memory_used_counter =
690
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
29
    _common_profile->add_info_string("IsColocate",
692
29
                                     std::to_string(_parent->is_colocated_operator()));
693
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
29
    return Status::OK();
697
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
6.76k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
6.76k
    _operator_profile =
640
6.76k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
6.76k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
6.76k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
6.76k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
6.76k
    _operator_profile->add_child(_common_profile, true);
649
6.76k
    _operator_profile->add_child(_custom_profile, true);
650
651
6.76k
    _operator_profile->set_metadata(_parent->node_id());
652
6.76k
    _wait_for_finish_dependency_timer =
653
6.76k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
6.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
6.76k
    if constexpr (!is_fake_shared) {
656
6.76k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
6.76k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
6.76k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
6.76k
            _shared_state = info.shared_state->template cast<SharedState>();
672
6.76k
            _dependency = _shared_state->create_sink_dependency(
673
6.76k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
6.76k
        }
675
6.76k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
6.76k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
6.76k
    }
678
679
6.76k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
6.76k
    _rows_input_counter =
684
6.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
6.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
6.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
6.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
6.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
6.76k
    _memory_used_counter =
690
6.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
6.76k
    _common_profile->add_info_string("IsColocate",
692
6.76k
                                     std::to_string(_parent->is_colocated_operator()));
693
6.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
6.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
6.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
6.76k
    return Status::OK();
697
6.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
10.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
10.2k
    _operator_profile =
640
10.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
10.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
10.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
10.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
10.2k
    _operator_profile->add_child(_common_profile, true);
649
10.2k
    _operator_profile->add_child(_custom_profile, true);
650
651
10.2k
    _operator_profile->set_metadata(_parent->node_id());
652
10.2k
    _wait_for_finish_dependency_timer =
653
10.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
10.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
10.2k
    if constexpr (!is_fake_shared) {
656
10.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
10.2k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
10.2k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
10.2k
            _shared_state = info.shared_state->template cast<SharedState>();
672
10.2k
            _dependency = _shared_state->create_sink_dependency(
673
10.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
10.2k
        }
675
10.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
10.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
10.2k
    }
678
679
10.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
10.2k
    _rows_input_counter =
684
10.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
10.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
10.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
10.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
10.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
10.2k
    _memory_used_counter =
690
10.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
10.2k
    _common_profile->add_info_string("IsColocate",
692
10.2k
                                     std::to_string(_parent->is_colocated_operator()));
693
10.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
10.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
10.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
10.2k
    return Status::OK();
697
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
122k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
122k
    _operator_profile =
640
122k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
122k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
122k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
122k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
122k
    _operator_profile->add_child(_common_profile, true);
649
122k
    _operator_profile->add_child(_custom_profile, true);
650
651
122k
    _operator_profile->set_metadata(_parent->node_id());
652
122k
    _wait_for_finish_dependency_timer =
653
122k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
122k
    if constexpr (!is_fake_shared) {
656
122k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
122k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
122k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
122k
            _shared_state = info.shared_state->template cast<SharedState>();
672
122k
            _dependency = _shared_state->create_sink_dependency(
673
122k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
122k
        }
675
122k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
122k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
122k
    }
678
679
122k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
122k
    _rows_input_counter =
684
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
122k
    _memory_used_counter =
690
122k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
122k
    _common_profile->add_info_string("IsColocate",
692
122k
                                     std::to_string(_parent->is_colocated_operator()));
693
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
122k
    return Status::OK();
697
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
622
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
622
    _operator_profile =
640
622
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
622
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
622
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
622
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
622
    _operator_profile->add_child(_common_profile, true);
649
622
    _operator_profile->add_child(_custom_profile, true);
650
651
622
    _operator_profile->set_metadata(_parent->node_id());
652
622
    _wait_for_finish_dependency_timer =
653
622
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
622
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
622
    if constexpr (!is_fake_shared) {
656
622
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
622
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
622
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
622
            _shared_state = info.shared_state->template cast<SharedState>();
672
622
            _dependency = _shared_state->create_sink_dependency(
673
622
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
622
        }
675
622
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
622
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
622
    }
678
679
622
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
622
    _rows_input_counter =
684
622
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
622
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
622
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
622
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
622
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
622
    _memory_used_counter =
690
622
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
622
    _common_profile->add_info_string("IsColocate",
692
622
                                     std::to_string(_parent->is_colocated_operator()));
693
622
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
622
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
622
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
622
    return Status::OK();
697
622
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
584k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
584k
    _operator_profile =
640
584k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
584k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
584k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
584k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
584k
    _operator_profile->add_child(_common_profile, true);
649
584k
    _operator_profile->add_child(_custom_profile, true);
650
651
584k
    _operator_profile->set_metadata(_parent->node_id());
652
584k
    _wait_for_finish_dependency_timer =
653
584k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
584k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
    if constexpr (!is_fake_shared) {
656
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
                                                  ? 0
664
                                                  : info.task_idx]
665
                                  .get();
666
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
            _shared_state = info.shared_state->template cast<SharedState>();
672
            _dependency = _shared_state->create_sink_dependency(
673
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
        }
675
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
    }
678
679
584k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
584k
    _rows_input_counter =
684
584k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
584k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
584k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
584k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
584k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
584k
    _memory_used_counter =
690
584k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
584k
    _common_profile->add_info_string("IsColocate",
692
584k
                                     std::to_string(_parent->is_colocated_operator()));
693
584k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
584k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
584k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
584k
    return Status::OK();
697
584k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
6.99k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
6.99k
    _operator_profile =
640
6.99k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
6.99k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
6.99k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
6.99k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
6.99k
    _operator_profile->add_child(_common_profile, true);
649
6.99k
    _operator_profile->add_child(_custom_profile, true);
650
651
6.99k
    _operator_profile->set_metadata(_parent->node_id());
652
6.99k
    _wait_for_finish_dependency_timer =
653
6.99k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
6.99k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
6.99k
    if constexpr (!is_fake_shared) {
656
6.99k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
6.99k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
6.99k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
6.99k
            _shared_state = info.shared_state->template cast<SharedState>();
672
6.99k
            _dependency = _shared_state->create_sink_dependency(
673
6.99k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
6.99k
        }
675
6.99k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
6.99k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
6.99k
    }
678
679
6.99k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
6.99k
    _rows_input_counter =
684
6.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
6.99k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
6.99k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
6.99k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
6.99k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
6.99k
    _memory_used_counter =
690
6.99k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
6.99k
    _common_profile->add_info_string("IsColocate",
692
6.99k
                                     std::to_string(_parent->is_colocated_operator()));
693
6.99k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
6.99k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
6.99k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
6.99k
    return Status::OK();
697
6.99k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
454
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
454
    _operator_profile =
640
454
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
454
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
454
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
454
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
454
    _operator_profile->add_child(_common_profile, true);
649
454
    _operator_profile->add_child(_custom_profile, true);
650
651
454
    _operator_profile->set_metadata(_parent->node_id());
652
454
    _wait_for_finish_dependency_timer =
653
454
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
454
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
454
    if constexpr (!is_fake_shared) {
656
454
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
454
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
454
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
454
            _shared_state = info.shared_state->template cast<SharedState>();
672
454
            _dependency = _shared_state->create_sink_dependency(
673
454
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
454
        }
675
454
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
454
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
454
    }
678
679
454
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
454
    _rows_input_counter =
684
454
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
454
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
454
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
454
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
454
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
454
    _memory_used_counter =
690
454
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
454
    _common_profile->add_info_string("IsColocate",
692
454
                                     std::to_string(_parent->is_colocated_operator()));
693
454
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
454
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
454
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
454
    return Status::OK();
697
454
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
2.50k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
2.50k
    _operator_profile =
640
2.50k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
2.50k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
2.50k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
2.50k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
2.50k
    _operator_profile->add_child(_common_profile, true);
649
2.50k
    _operator_profile->add_child(_custom_profile, true);
650
651
2.50k
    _operator_profile->set_metadata(_parent->node_id());
652
2.50k
    _wait_for_finish_dependency_timer =
653
2.50k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
2.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.50k
    if constexpr (!is_fake_shared) {
656
2.50k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.50k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
2.50k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.50k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.50k
            _dependency = _shared_state->create_sink_dependency(
673
2.50k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.50k
        }
675
2.50k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.50k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.50k
    }
678
679
2.50k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
2.50k
    _rows_input_counter =
684
2.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
2.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
2.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
2.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
2.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
2.50k
    _memory_used_counter =
690
2.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
2.50k
    _common_profile->add_info_string("IsColocate",
692
2.50k
                                     std::to_string(_parent->is_colocated_operator()));
693
2.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
2.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
2.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
2.50k
    return Status::OK();
697
2.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
12.0k
    _operator_profile =
640
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
12.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
12.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
12.0k
    _operator_profile->add_child(_common_profile, true);
649
12.0k
    _operator_profile->add_child(_custom_profile, true);
650
651
12.0k
    _operator_profile->set_metadata(_parent->node_id());
652
12.0k
    _wait_for_finish_dependency_timer =
653
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
12.0k
    if constexpr (!is_fake_shared) {
656
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
12.0k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
12.0k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
672
12.0k
            _dependency = _shared_state->create_sink_dependency(
673
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
12.0k
        }
675
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
12.0k
    }
678
679
12.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
12.0k
    _rows_input_counter =
684
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
12.0k
    _memory_used_counter =
690
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
12.0k
    _common_profile->add_info_string("IsColocate",
692
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
693
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
12.0k
    return Status::OK();
697
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
319k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
319k
    _operator_profile =
640
319k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
319k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
319k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
319k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
319k
    _operator_profile->add_child(_common_profile, true);
649
319k
    _operator_profile->add_child(_custom_profile, true);
650
651
319k
    _operator_profile->set_metadata(_parent->node_id());
652
319k
    _wait_for_finish_dependency_timer =
653
319k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
319k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
319k
    if constexpr (!is_fake_shared) {
656
319k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
319k
            info.shared_state_map.end()) {
658
319k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
319k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
319k
            }
661
319k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
319k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
319k
                                                  ? 0
664
319k
                                                  : info.task_idx]
665
319k
                                  .get();
666
319k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
319k
        } else {
668
95
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
95
                DCHECK(false);
670
95
            }
671
95
            _shared_state = info.shared_state->template cast<SharedState>();
672
95
            _dependency = _shared_state->create_sink_dependency(
673
95
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
95
        }
675
319k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
319k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
319k
    }
678
679
319k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
319k
    _rows_input_counter =
684
319k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
319k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
319k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
319k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
319k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
319k
    _memory_used_counter =
690
319k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
319k
    _common_profile->add_info_string("IsColocate",
692
319k
                                     std::to_string(_parent->is_colocated_operator()));
693
319k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
319k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
319k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
319k
    return Status::OK();
697
319k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
442k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
442k
    _operator_profile =
640
442k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
442k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
442k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
442k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
442k
    _operator_profile->add_child(_common_profile, true);
649
442k
    _operator_profile->add_child(_custom_profile, true);
650
651
442k
    _operator_profile->set_metadata(_parent->node_id());
652
442k
    _wait_for_finish_dependency_timer =
653
442k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
442k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
442k
    if constexpr (!is_fake_shared) {
656
442k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
442k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
714
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
714
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
714
                                                  ? 0
664
714
                                                  : info.task_idx]
665
714
                                  .get();
666
714
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
441k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
441k
            _shared_state = info.shared_state->template cast<SharedState>();
672
441k
            _dependency = _shared_state->create_sink_dependency(
673
441k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
441k
        }
675
442k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
442k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
442k
    }
678
679
442k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
442k
    _rows_input_counter =
684
442k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
442k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
442k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
442k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
442k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
442k
    _memory_used_counter =
690
442k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
442k
    _common_profile->add_info_string("IsColocate",
692
442k
                                     std::to_string(_parent->is_colocated_operator()));
693
442k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
442k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
442k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
442k
    return Status::OK();
697
442k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
111
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
111
    _operator_profile =
640
111
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
111
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
111
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
111
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
111
    _operator_profile->add_child(_common_profile, true);
649
111
    _operator_profile->add_child(_custom_profile, true);
650
651
111
    _operator_profile->set_metadata(_parent->node_id());
652
111
    _wait_for_finish_dependency_timer =
653
111
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
111
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
111
    if constexpr (!is_fake_shared) {
656
111
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
111
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
111
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
111
            _shared_state = info.shared_state->template cast<SharedState>();
672
111
            _dependency = _shared_state->create_sink_dependency(
673
111
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
111
        }
675
111
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
111
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
111
    }
678
679
111
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
111
    _rows_input_counter =
684
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
111
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
111
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
111
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
111
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
111
    _memory_used_counter =
690
111
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
111
    _common_profile->add_info_string("IsColocate",
692
111
                                     std::to_string(_parent->is_colocated_operator()));
693
111
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
111
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
111
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
111
    return Status::OK();
697
111
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
300
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
300
    _operator_profile =
640
300
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
300
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
300
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
300
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
300
    _operator_profile->add_child(_common_profile, true);
649
300
    _operator_profile->add_child(_custom_profile, true);
650
651
300
    _operator_profile->set_metadata(_parent->node_id());
652
300
    _wait_for_finish_dependency_timer =
653
300
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
300
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
300
    if constexpr (!is_fake_shared) {
656
300
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
300
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
300
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
300
            _shared_state = info.shared_state->template cast<SharedState>();
672
300
            _dependency = _shared_state->create_sink_dependency(
673
300
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
300
        }
675
300
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
300
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
300
    }
678
679
300
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
300
    _rows_input_counter =
684
300
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
300
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
300
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
300
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
300
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
300
    _memory_used_counter =
690
300
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
300
    _common_profile->add_info_string("IsColocate",
692
300
                                     std::to_string(_parent->is_colocated_operator()));
693
300
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
300
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
300
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
300
    return Status::OK();
697
300
}
698
699
template <typename SharedState>
700
1.88M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
1.88M
    if (_closed) {
702
2
        return Status::OK();
703
2
    }
704
1.88M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
1.30M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
1.30M
    }
707
1.88M
    _closed = true;
708
1.88M
    return Status::OK();
709
1.88M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
183k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
183k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
183k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
183k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
183k
    }
707
183k
    _closed = true;
708
183k
    return Status::OK();
709
183k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
1
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
1
    }
707
1
    _closed = true;
708
1
    return Status::OK();
709
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
191k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
191k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
191k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
191k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
191k
    }
707
191k
    _closed = true;
708
191k
    return Status::OK();
709
191k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
21
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
21
    if (_closed) {
702
2
        return Status::OK();
703
2
    }
704
19
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
19
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
19
    }
707
19
    _closed = true;
708
19
    return Status::OK();
709
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
6.76k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
6.76k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
6.76k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
6.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
6.76k
    }
707
6.76k
    _closed = true;
708
6.76k
    return Status::OK();
709
6.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
10.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
10.2k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
10.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
10.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
10.2k
    }
707
10.2k
    _closed = true;
708
10.2k
    return Status::OK();
709
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
121k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
121k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
121k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
121k
    }
707
121k
    _closed = true;
708
121k
    return Status::OK();
709
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
609
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
609
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
609
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
609
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
609
    }
707
609
    _closed = true;
708
609
    return Status::OK();
709
609
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
584k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
584k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
    }
707
584k
    _closed = true;
708
584k
    return Status::OK();
709
584k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
7.00k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
7.00k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
7.00k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
7.00k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
7.00k
    }
707
7.00k
    _closed = true;
708
7.00k
    return Status::OK();
709
7.00k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
352
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
352
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
352
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
352
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
352
    }
707
352
    _closed = true;
708
352
    return Status::OK();
709
352
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
2.50k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
2.50k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
2.50k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
2.50k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
2.50k
    }
707
2.50k
    _closed = true;
708
2.50k
    return Status::OK();
709
2.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
12.0k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
12.0k
    }
707
12.0k
    _closed = true;
708
12.0k
    return Status::OK();
709
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
320k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
320k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
320k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
320k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
320k
    }
707
320k
    _closed = true;
708
320k
    return Status::OK();
709
320k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
444k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
444k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
444k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
444k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
444k
    }
707
444k
    _closed = true;
708
444k
    return Status::OK();
709
444k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
108
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
108
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
108
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
108
    }
707
108
    _closed = true;
708
108
    return Status::OK();
709
108
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
300
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
300
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
300
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
300
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
300
    }
707
300
    _closed = true;
708
300
    return Status::OK();
709
300
}
710
711
template <typename LocalStateType>
712
6.84k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
713
6.84k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
714
6.84k
    return pull(state, block, eos);
715
6.84k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
712
31
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
713
31
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
714
31
    return pull(state, block, eos);
715
31
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
712
6.81k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
713
6.81k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
714
6.81k
    return pull(state, block, eos);
715
6.81k
}
716
717
template <typename LocalStateType>
718
798k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
798k
    auto& local_state = get_local_state(state);
720
798k
    if (need_more_input_data(state)) {
721
723k
        local_state._child_block->clear_column_data(
722
723k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
723k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
723k
                state, local_state._child_block.get(), &local_state._child_eos));
725
723k
        *eos = local_state._child_eos;
726
723k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
64.3k
            return Status::OK();
728
64.3k
        }
729
658k
        {
730
658k
            SCOPED_TIMER(local_state.exec_time_counter());
731
658k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
658k
        }
733
658k
    }
734
735
734k
    if (!need_more_input_data(state)) {
736
696k
        SCOPED_TIMER(local_state.exec_time_counter());
737
696k
        bool new_eos = false;
738
696k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
696k
        if (new_eos) {
740
620k
            *eos = true;
741
620k
        } else if (!need_more_input_data(state)) {
742
26.2k
            *eos = false;
743
26.2k
        }
744
696k
    }
745
734k
    return Status::OK();
746
734k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
188k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
188k
    auto& local_state = get_local_state(state);
720
188k
    if (need_more_input_data(state)) {
721
126k
        local_state._child_block->clear_column_data(
722
126k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
126k
                state, local_state._child_block.get(), &local_state._child_eos));
725
126k
        *eos = local_state._child_eos;
726
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
25.6k
            return Status::OK();
728
25.6k
        }
729
101k
        {
730
101k
            SCOPED_TIMER(local_state.exec_time_counter());
731
101k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
101k
        }
733
101k
    }
734
735
162k
    if (!need_more_input_data(state)) {
736
162k
        SCOPED_TIMER(local_state.exec_time_counter());
737
162k
        bool new_eos = false;
738
162k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
162k
        if (new_eos) {
740
111k
            *eos = true;
741
111k
        } else if (!need_more_input_data(state)) {
742
11.4k
            *eos = false;
743
11.4k
        }
744
162k
    }
745
162k
    return Status::OK();
746
162k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
3.37k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
3.37k
    auto& local_state = get_local_state(state);
720
3.37k
    if (need_more_input_data(state)) {
721
2.06k
        local_state._child_block->clear_column_data(
722
2.06k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
2.06k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
2.06k
                state, local_state._child_block.get(), &local_state._child_eos));
725
2.06k
        *eos = local_state._child_eos;
726
2.06k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
326
            return Status::OK();
728
326
        }
729
1.74k
        {
730
1.74k
            SCOPED_TIMER(local_state.exec_time_counter());
731
1.74k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
1.74k
        }
733
1.74k
    }
734
735
3.04k
    if (!need_more_input_data(state)) {
736
3.04k
        SCOPED_TIMER(local_state.exec_time_counter());
737
3.04k
        bool new_eos = false;
738
3.04k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
3.04k
        if (new_eos) {
740
1.49k
            *eos = true;
741
1.55k
        } else if (!need_more_input_data(state)) {
742
1.30k
            *eos = false;
743
1.30k
        }
744
3.04k
    }
745
3.04k
    return Status::OK();
746
3.04k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
1.57k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
1.57k
    auto& local_state = get_local_state(state);
720
1.57k
    if (need_more_input_data(state)) {
721
1.57k
        local_state._child_block->clear_column_data(
722
1.57k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
1.57k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
1.57k
                state, local_state._child_block.get(), &local_state._child_eos));
725
1.57k
        *eos = local_state._child_eos;
726
1.57k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
647
            return Status::OK();
728
647
        }
729
931
        {
730
931
            SCOPED_TIMER(local_state.exec_time_counter());
731
931
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
931
        }
733
931
    }
734
735
931
    if (!need_more_input_data(state)) {
736
931
        SCOPED_TIMER(local_state.exec_time_counter());
737
931
        bool new_eos = false;
738
931
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
931
        if (new_eos) {
740
676
            *eos = true;
741
676
        } else if (!need_more_input_data(state)) {
742
0
            *eos = false;
743
0
        }
744
931
    }
745
931
    return Status::OK();
746
931
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
16.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
16.7k
    auto& local_state = get_local_state(state);
720
16.7k
    if (need_more_input_data(state)) {
721
16.6k
        local_state._child_block->clear_column_data(
722
16.6k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
16.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
16.6k
                state, local_state._child_block.get(), &local_state._child_eos));
725
16.6k
        *eos = local_state._child_eos;
726
16.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
4.12k
            return Status::OK();
728
4.12k
        }
729
12.5k
        {
730
12.5k
            SCOPED_TIMER(local_state.exec_time_counter());
731
12.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
12.5k
        }
733
12.5k
    }
734
735
12.5k
    if (!need_more_input_data(state)) {
736
8.03k
        SCOPED_TIMER(local_state.exec_time_counter());
737
8.03k
        bool new_eos = false;
738
8.03k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
8.03k
        if (new_eos) {
740
7.81k
            *eos = true;
741
7.81k
        } else if (!need_more_input_data(state)) {
742
61
            *eos = false;
743
61
        }
744
8.03k
    }
745
12.5k
    return Status::OK();
746
12.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
552k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
552k
    auto& local_state = get_local_state(state);
720
553k
    if (need_more_input_data(state)) {
721
553k
        local_state._child_block->clear_column_data(
722
553k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
553k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
553k
                state, local_state._child_block.get(), &local_state._child_eos));
725
553k
        *eos = local_state._child_eos;
726
553k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
31.5k
            return Status::OK();
728
31.5k
        }
729
521k
        {
730
521k
            SCOPED_TIMER(local_state.exec_time_counter());
731
521k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
521k
        }
733
521k
    }
734
735
520k
    if (!need_more_input_data(state)) {
736
488k
        SCOPED_TIMER(local_state.exec_time_counter());
737
488k
        bool new_eos = false;
738
488k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
488k
        if (new_eos) {
740
487k
            *eos = true;
741
487k
        } else if (!need_more_input_data(state)) {
742
0
            *eos = false;
743
0
        }
744
488k
    }
745
520k
    return Status::OK();
746
520k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
29.5k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
29.5k
    auto& local_state = get_local_state(state);
720
29.5k
    if (need_more_input_data(state)) {
721
16.5k
        local_state._child_block->clear_column_data(
722
16.5k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
16.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
16.5k
                state, local_state._child_block.get(), &local_state._child_eos));
725
16.5k
        *eos = local_state._child_eos;
726
16.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
1.69k
            return Status::OK();
728
1.69k
        }
729
14.8k
        {
730
14.8k
            SCOPED_TIMER(local_state.exec_time_counter());
731
14.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
14.8k
        }
733
14.8k
    }
734
735
27.8k
    if (!need_more_input_data(state)) {
736
26.7k
        SCOPED_TIMER(local_state.exec_time_counter());
737
26.7k
        bool new_eos = false;
738
26.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
26.7k
        if (new_eos) {
740
6.74k
            *eos = true;
741
20.0k
        } else if (!need_more_input_data(state)) {
742
13.0k
            *eos = false;
743
13.0k
        }
744
26.7k
    }
745
27.8k
    return Status::OK();
746
27.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
6.53k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
6.53k
    auto& local_state = get_local_state(state);
720
6.53k
    if (need_more_input_data(state)) {
721
6.16k
        local_state._child_block->clear_column_data(
722
6.16k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
6.16k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
6.16k
                state, local_state._child_block.get(), &local_state._child_eos));
725
6.16k
        *eos = local_state._child_eos;
726
6.16k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
299
            return Status::OK();
728
299
        }
729
5.86k
        {
730
5.86k
            SCOPED_TIMER(local_state.exec_time_counter());
731
5.86k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
5.86k
        }
733
5.86k
    }
734
735
6.23k
    if (!need_more_input_data(state)) {
736
6.22k
        SCOPED_TIMER(local_state.exec_time_counter());
737
6.22k
        bool new_eos = false;
738
6.22k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
6.22k
        if (new_eos) {
740
4.30k
            *eos = true;
741
4.30k
        } else if (!need_more_input_data(state)) {
742
374
            *eos = false;
743
374
        }
744
6.22k
    }
745
6.23k
    return Status::OK();
746
6.23k
}
747
748
template <typename Writer, typename Parent>
749
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
750
67.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
751
67.1k
    RETURN_IF_ERROR(Base::init(state, info));
752
67.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
753
67.1k
                                                         "AsyncWriterDependency", true);
754
67.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
755
67.1k
                             _finish_dependency));
756
757
67.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
758
67.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
759
67.1k
    return Status::OK();
760
67.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
750
336
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
751
336
    RETURN_IF_ERROR(Base::init(state, info));
752
336
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
753
336
                                                         "AsyncWriterDependency", true);
754
336
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
755
336
                             _finish_dependency));
756
757
336
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
758
336
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
759
336
    return Status::OK();
760
336
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
750
66.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
751
66.7k
    RETURN_IF_ERROR(Base::init(state, info));
752
66.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
753
66.7k
                                                         "AsyncWriterDependency", true);
754
66.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
755
66.7k
                             _finish_dependency));
756
757
66.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
758
66.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
759
66.7k
    return Status::OK();
760
66.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
750
126
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
751
126
    RETURN_IF_ERROR(Base::init(state, info));
752
126
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
753
126
                                                         "AsyncWriterDependency", true);
754
126
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
755
126
                             _finish_dependency));
756
757
126
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
758
126
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
759
126
    return Status::OK();
760
126
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
761
762
template <typename Writer, typename Parent>
763
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
764
67.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
765
67.5k
    RETURN_IF_ERROR(Base::open(state));
766
67.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
767
472k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
768
404k
        RETURN_IF_ERROR(
769
404k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
770
404k
    }
771
67.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
772
67.5k
    return Status::OK();
773
67.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
764
337
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
765
337
    RETURN_IF_ERROR(Base::open(state));
766
337
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
767
1.77k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
768
1.43k
        RETURN_IF_ERROR(
769
1.43k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
770
1.43k
    }
771
337
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
772
337
    return Status::OK();
773
337
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
764
67.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
765
67.0k
    RETURN_IF_ERROR(Base::open(state));
766
67.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
767
468k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
768
400k
        RETURN_IF_ERROR(
769
400k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
770
400k
    }
771
67.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
772
67.0k
    return Status::OK();
773
67.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
764
126
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
765
126
    RETURN_IF_ERROR(Base::open(state));
766
126
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
767
2.26k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
768
2.14k
        RETURN_IF_ERROR(
769
2.14k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
770
2.14k
    }
771
126
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
772
126
    return Status::OK();
773
126
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
81.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
778
81.1k
    return _writer->sink(block, eos);
779
81.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
777
1.35k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
778
1.35k
    return _writer->sink(block, eos);
779
1.35k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
777
79.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
778
79.6k
    return _writer->sink(block, eos);
779
79.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
777
126
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
778
126
    return _writer->sink(block, eos);
779
126
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
67.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
784
67.5k
    if (_closed) {
785
0
        return Status::OK();
786
0
    }
787
67.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
788
67.5k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
789
    // if the init failed, the _writer may be nullptr. so here need check
790
67.6k
    if (_writer) {
791
67.6k
        Status st = _writer->get_writer_status();
792
67.6k
        if (exec_status.ok()) {
793
67.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
794
67.5k
                                                       : Status::Cancelled("force close"));
795
67.5k
        } else {
796
69
            _writer->force_close(exec_status);
797
69
        }
798
        // If there is an error in process_block thread, then we should get the writer
799
        // status before call force_close. For example, the thread may failed in commit
800
        // transaction.
801
67.6k
        RETURN_IF_ERROR(st);
802
67.6k
    }
803
67.5k
    return Base::close(state, exec_status);
804
67.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
783
325
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
784
325
    if (_closed) {
785
0
        return Status::OK();
786
0
    }
787
325
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
788
325
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
789
    // if the init failed, the _writer may be nullptr. so here need check
790
325
    if (_writer) {
791
325
        Status st = _writer->get_writer_status();
792
325
        if (exec_status.ok()) {
793
325
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
794
325
                                                       : Status::Cancelled("force close"));
795
325
        } else {
796
0
            _writer->force_close(exec_status);
797
0
        }
798
        // If there is an error in process_block thread, then we should get the writer
799
        // status before call force_close. For example, the thread may failed in commit
800
        // transaction.
801
325
        RETURN_IF_ERROR(st);
802
325
    }
803
325
    return Base::close(state, exec_status);
804
325
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
783
67.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
784
67.1k
    if (_closed) {
785
0
        return Status::OK();
786
0
    }
787
67.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
788
67.1k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
789
    // if the init failed, the _writer may be nullptr. so here need check
790
67.1k
    if (_writer) {
791
67.1k
        Status st = _writer->get_writer_status();
792
67.1k
        if (exec_status.ok()) {
793
67.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
794
67.0k
                                                       : Status::Cancelled("force close"));
795
67.0k
        } else {
796
69
            _writer->force_close(exec_status);
797
69
        }
798
        // If there is an error in process_block thread, then we should get the writer
799
        // status before call force_close. For example, the thread may failed in commit
800
        // transaction.
801
67.1k
        RETURN_IF_ERROR(st);
802
67.1k
    }
803
67.0k
    return Base::close(state, exec_status);
804
67.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
783
126
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
784
126
    if (_closed) {
785
0
        return Status::OK();
786
0
    }
787
126
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
788
126
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
789
    // if the init failed, the _writer may be nullptr. so here need check
790
126
    if (_writer) {
791
126
        Status st = _writer->get_writer_status();
792
126
        if (exec_status.ok()) {
793
126
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
794
126
                                                       : Status::Cancelled("force close"));
795
126
        } else {
796
0
            _writer->force_close(exec_status);
797
0
        }
798
        // If there is an error in process_block thread, then we should get the writer
799
        // status before call force_close. For example, the thread may failed in commit
800
        // transaction.
801
126
        RETURN_IF_ERROR(st);
802
126
    }
803
126
    return Base::close(state, exec_status);
804
126
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
805
806
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
807
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
808
DECLARE_OPERATOR(ResultSinkLocalState)
809
DECLARE_OPERATOR(JdbcTableSinkLocalState)
810
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
811
DECLARE_OPERATOR(ResultFileSinkLocalState)
812
DECLARE_OPERATOR(OlapTableSinkLocalState)
813
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
814
DECLARE_OPERATOR(HiveTableSinkLocalState)
815
DECLARE_OPERATOR(TVFTableSinkLocalState)
816
DECLARE_OPERATOR(IcebergTableSinkLocalState)
817
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
818
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
819
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
820
DECLARE_OPERATOR(MCTableSinkLocalState)
821
DECLARE_OPERATOR(AnalyticSinkLocalState)
822
DECLARE_OPERATOR(BlackholeSinkLocalState)
823
DECLARE_OPERATOR(SortSinkLocalState)
824
DECLARE_OPERATOR(SpillSortSinkLocalState)
825
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
826
DECLARE_OPERATOR(AggSinkLocalState)
827
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
828
DECLARE_OPERATOR(ExchangeSinkLocalState)
829
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
830
DECLARE_OPERATOR(UnionSinkLocalState)
831
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
832
DECLARE_OPERATOR(PartitionSortSinkLocalState)
833
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
834
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
835
DECLARE_OPERATOR(SetSinkLocalState<true>)
836
DECLARE_OPERATOR(SetSinkLocalState<false>)
837
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
838
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
839
DECLARE_OPERATOR(CacheSinkLocalState)
840
DECLARE_OPERATOR(DictSinkLocalState)
841
DECLARE_OPERATOR(RecCTESinkLocalState)
842
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
843
844
#undef DECLARE_OPERATOR
845
846
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
847
DECLARE_OPERATOR(HashJoinProbeLocalState)
848
DECLARE_OPERATOR(OlapScanLocalState)
849
DECLARE_OPERATOR(GroupCommitLocalState)
850
DECLARE_OPERATOR(JDBCScanLocalState)
851
DECLARE_OPERATOR(FileScanLocalState)
852
DECLARE_OPERATOR(EsScanLocalState)
853
DECLARE_OPERATOR(AnalyticLocalState)
854
DECLARE_OPERATOR(SortLocalState)
855
DECLARE_OPERATOR(SpillSortLocalState)
856
DECLARE_OPERATOR(LocalMergeSortLocalState)
857
DECLARE_OPERATOR(AggLocalState)
858
DECLARE_OPERATOR(PartitionedAggLocalState)
859
DECLARE_OPERATOR(TableFunctionLocalState)
860
DECLARE_OPERATOR(ExchangeLocalState)
861
DECLARE_OPERATOR(RepeatLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
863
DECLARE_OPERATOR(AssertNumRowsLocalState)
864
DECLARE_OPERATOR(EmptySetLocalState)
865
DECLARE_OPERATOR(UnionSourceLocalState)
866
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
867
DECLARE_OPERATOR(PartitionSortSourceLocalState)
868
DECLARE_OPERATOR(SetSourceLocalState<true>)
869
DECLARE_OPERATOR(SetSourceLocalState<false>)
870
DECLARE_OPERATOR(DataGenLocalState)
871
DECLARE_OPERATOR(SchemaScanLocalState)
872
DECLARE_OPERATOR(MetaScanLocalState)
873
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
874
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
875
DECLARE_OPERATOR(CacheSourceLocalState)
876
DECLARE_OPERATOR(RecCTESourceLocalState)
877
DECLARE_OPERATOR(RecCTEScanLocalState)
878
879
#ifdef BE_TEST
880
DECLARE_OPERATOR(MockLocalState)
881
DECLARE_OPERATOR(MockScanLocalState)
882
#endif
883
#undef DECLARE_OPERATOR
884
885
template class StreamingOperatorX<AssertNumRowsLocalState>;
886
template class StreamingOperatorX<SelectLocalState>;
887
888
template class StatefulOperatorX<HashJoinProbeLocalState>;
889
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
890
template class StatefulOperatorX<RepeatLocalState>;
891
template class StatefulOperatorX<MaterializationLocalState>;
892
template class StatefulOperatorX<StreamingAggLocalState>;
893
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
894
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
895
template class StatefulOperatorX<TableFunctionLocalState>;
896
897
template class PipelineXSinkLocalState<HashJoinSharedState>;
898
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
899
template class PipelineXSinkLocalState<SortSharedState>;
900
template class PipelineXSinkLocalState<SpillSortSharedState>;
901
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
902
template class PipelineXSinkLocalState<AnalyticSharedState>;
903
template class PipelineXSinkLocalState<AggSharedState>;
904
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
905
template class PipelineXSinkLocalState<FakeSharedState>;
906
template class PipelineXSinkLocalState<UnionSharedState>;
907
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
908
template class PipelineXSinkLocalState<MultiCastSharedState>;
909
template class PipelineXSinkLocalState<SetSharedState>;
910
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
911
template class PipelineXSinkLocalState<BasicSharedState>;
912
template class PipelineXSinkLocalState<DataQueueSharedState>;
913
template class PipelineXSinkLocalState<RecCTESharedState>;
914
915
template class PipelineXLocalState<HashJoinSharedState>;
916
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
917
template class PipelineXLocalState<SortSharedState>;
918
template class PipelineXLocalState<SpillSortSharedState>;
919
template class PipelineXLocalState<NestedLoopJoinSharedState>;
920
template class PipelineXLocalState<AnalyticSharedState>;
921
template class PipelineXLocalState<AggSharedState>;
922
template class PipelineXLocalState<PartitionedAggSharedState>;
923
template class PipelineXLocalState<FakeSharedState>;
924
template class PipelineXLocalState<UnionSharedState>;
925
template class PipelineXLocalState<DataQueueSharedState>;
926
template class PipelineXLocalState<MultiCastSharedState>;
927
template class PipelineXLocalState<PartitionSortNodeSharedState>;
928
template class PipelineXLocalState<SetSharedState>;
929
template class PipelineXLocalState<LocalExchangeSharedState>;
930
template class PipelineXLocalState<BasicSharedState>;
931
template class PipelineXLocalState<RecCTESharedState>;
932
933
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
934
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
936
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
937
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
938
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
939
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
940
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
941
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
942
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
943
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
944
945
#ifdef BE_TEST
946
template class OperatorX<DummyOperatorLocalState>;
947
template class DataSinkOperatorX<DummySinkLocalState>;
948
#endif
949
950
#include "common/compile_check_end.h"
951
} // namespace doris