Coverage Report

Created: 2026-04-03 11:13

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.25M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.25M
    if (_parent->nereids_id() == -1) {
120
1.17M
        return fmt::format("(id={})", _parent->node_id());
121
1.17M
    } else {
122
1.07M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.07M
    }
124
2.25M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
97.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
97.4k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
97.4k
    } else {
122
97.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
97.4k
    }
124
97.4k
}
_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
263k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
263k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
263k
    } else {
122
263k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
263k
    }
124
263k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
21
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
21
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
21
    } else {
122
21
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
21
    }
124
21
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
8.93k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
8.93k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
8.93k
    } else {
122
8.93k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8.93k
    }
124
8.93k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.81k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.81k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
6.80k
    } else {
122
6.80k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.80k
    }
124
6.81k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
136k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
136k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
136k
    } else {
122
136k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
136k
    }
124
136k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
12
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
12
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
12
    } else {
122
12
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
12
    }
124
12
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
912k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
912k
    if (_parent->nereids_id() == -1) {
120
405k
        return fmt::format("(id={})", _parent->node_id());
121
507k
    } else {
122
507k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
507k
    }
124
912k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
53.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
53.6k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
53.6k
    } else {
122
53.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
53.6k
    }
124
53.6k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
17
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
17
    if (_parent->nereids_id() == -1) {
120
17
        return fmt::format("(id={})", _parent->node_id());
121
17
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
17
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.7k
    if (_parent->nereids_id() == -1) {
120
10.7k
        return fmt::format("(id={})", _parent->node_id());
121
10.7k
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
10.7k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
373
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
373
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
271
    } else {
122
271
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
271
    }
124
373
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.54k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.54k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
4.53k
    } else {
122
4.53k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.53k
    }
124
4.54k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
758k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
758k
    if (_parent->nereids_id() == -1) {
120
758k
        return fmt::format("(id={})", _parent->node_id());
121
758k
    } else {
122
339
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
339
    }
124
758k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
151
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
151
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
151
    } else {
122
151
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
151
    }
124
151
}
125
126
template <typename SharedStateArg>
127
1.39M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.39M
    if (_parent->nereids_id() == -1) {
129
820k
        return fmt::format("(id={})", _parent->node_id());
130
820k
    } else {
131
570k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
570k
    }
133
1.39M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
145k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
145k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
145k
    } else {
131
145k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
145k
    }
133
145k
}
_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
265k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
265k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
265k
    } else {
131
265k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
265k
    }
133
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
27
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
27
    } else {
131
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
27
    }
133
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
8.97k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
8.97k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
8.97k
    } else {
131
8.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
8.97k
    }
133
8.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.85k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.85k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
6.84k
    } else {
131
6.84k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.84k
    }
133
6.85k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
136k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
136k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
136k
    } else {
131
136k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
136k
    }
133
136k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
22
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
22
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
22
    } else {
131
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
22
    }
133
22
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
104
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
104
    if (_parent->nereids_id() == -1) {
129
104
        return fmt::format("(id={})", _parent->node_id());
130
104
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
104
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
7.35k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
7.35k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
7.35k
    } else {
131
7.35k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
7.35k
    }
133
7.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
388
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
388
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
286
    } else {
131
286
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
286
    }
133
388
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
11.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
11.7k
    if (_parent->nereids_id() == -1) {
129
11.7k
        return fmt::format("(id={})", _parent->node_id());
130
11.7k
    } else {
131
9
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
9
    }
133
11.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
303k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
303k
    if (_parent->nereids_id() == -1) {
129
303k
        return fmt::format("(id={})", _parent->node_id());
130
303k
    } else {
131
52
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
52
    }
133
303k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
504k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
505k
    if (_parent->nereids_id() == -1) {
129
505k
        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
504k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
17
    if (_parent->nereids_id() == -1) {
129
17
        return fmt::format("(id={})", _parent->node_id());
130
17
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
302
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
302
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
302
    } else {
131
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
302
    }
133
302
}
134
135
template <typename SharedStateArg>
136
29.3k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
29.3k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
29.3k
    _terminated = true;
141
29.3k
    return Status::OK();
142
29.3k
}
_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
623
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
623
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
623
    _terminated = true;
141
623
    return Status::OK();
142
623
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3.23k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3.23k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3.23k
    _terminated = true;
141
3.23k
    return Status::OK();
142
3.23k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.06k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.06k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.06k
    _terminated = true;
141
1.06k
    return Status::OK();
142
1.06k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
7
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
7
    _terminated = true;
141
7
    return Status::OK();
142
7
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
112
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
112
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
112
    _terminated = true;
141
112
    return Status::OK();
142
112
}
_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
147
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
147
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
147
    _terminated = true;
141
147
    return Status::OK();
142
147
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
142
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
142
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
142
    _terminated = true;
141
142
    return Status::OK();
142
142
}
143
144
791k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
791k
    return _child && _child->is_serial_operator() && !is_source()
146
791k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
791k
                   : DataDistribution(ExchangeType::NOOP);
148
791k
}
149
150
81.8k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.8k
    return _child->row_desc();
152
81.8k
}
153
154
template <typename SharedStateArg>
155
55.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
55.1k
    fmt::memory_buffer debug_string_buffer;
157
55.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
55.1k
    return fmt::to_string(debug_string_buffer);
159
55.1k
}
_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
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
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
54.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
54.8k
    fmt::memory_buffer debug_string_buffer;
157
54.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
54.8k
    return fmt::to_string(debug_string_buffer);
159
54.8k
}
_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
222
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
222
    fmt::memory_buffer debug_string_buffer;
157
222
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
222
    return fmt::to_string(debug_string_buffer);
159
222
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
55.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
55.1k
    fmt::memory_buffer debug_string_buffer;
164
55.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
55.1k
    return fmt::to_string(debug_string_buffer);
166
55.1k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
4
    fmt::memory_buffer debug_string_buffer;
164
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
4
    return fmt::to_string(debug_string_buffer);
166
4
}
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
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
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
208
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
208
    fmt::memory_buffer debug_string_buffer;
164
208
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
208
    return fmt::to_string(debug_string_buffer);
166
208
}
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
54.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
54.8k
    fmt::memory_buffer debug_string_buffer;
164
54.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
54.8k
    return fmt::to_string(debug_string_buffer);
166
54.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
55.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
55.3k
    fmt::memory_buffer debug_string_buffer;
170
55.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
55.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
55.3k
                   _is_serial_operator);
173
55.3k
    return fmt::to_string(debug_string_buffer);
174
55.3k
}
175
176
55.1k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
55.1k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
55.1k
}
179
180
693k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
693k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
693k
    _nereids_id = tnode.nereids_id;
183
693k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
3.00k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
3.00k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
3.00k
            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
3.00k
    }
196
693k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
693k
    _op_name = substr + "_OPERATOR";
198
199
693k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
693k
    } else if (tnode.__isset.conjuncts) {
202
438k
        for (const auto& conjunct : tnode.conjuncts) {
203
438k
            VExprContextSPtr context;
204
438k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
438k
            _conjuncts.emplace_back(context);
206
438k
        }
207
139k
    }
208
209
    // create the projections expr
210
693k
    if (tnode.__isset.projections) {
211
304k
        DCHECK(tnode.__isset.output_tuple_id);
212
304k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
304k
    }
214
693k
    if (!tnode.intermediate_projections_list.empty()) {
215
3.00k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
3.00k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
4.08k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
4.08k
            VExprContextSPtrs projections;
219
4.08k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
4.08k
            _intermediate_projections.push_back(projections);
221
4.08k
        }
222
3.00k
    }
223
693k
    return Status::OK();
224
693k
}
225
226
723k
Status OperatorXBase::prepare(RuntimeState* state) {
227
723k
    for (auto& conjunct : _conjuncts) {
228
437k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
437k
    }
230
723k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
673k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
595k
            return a->execute_cost() < b->execute_cost();
233
595k
        });
234
673k
    };
235
236
727k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
4.08k
        RETURN_IF_ERROR(
238
4.08k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
4.08k
    }
240
723k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
723k
    if (has_output_row_desc()) {
243
304k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
304k
    }
245
246
723k
    for (auto& conjunct : _conjuncts) {
247
437k
        RETURN_IF_ERROR(conjunct->open(state));
248
437k
    }
249
723k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
723k
    for (auto& projections : _intermediate_projections) {
251
4.07k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
4.07k
    }
253
723k
    if (_child && !is_source()) {
254
138k
        RETURN_IF_ERROR(_child->prepare(state));
255
138k
    }
256
257
723k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
723k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
723k
    return Status::OK();
263
723k
}
264
265
7.35k
Status OperatorXBase::terminate(RuntimeState* state) {
266
7.35k
    if (_child && !is_source()) {
267
2.00k
        RETURN_IF_ERROR(_child->terminate(state));
268
2.00k
    }
269
7.35k
    auto result = state->get_local_state_result(operator_id());
270
7.35k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
7.35k
    return result.value()->terminate(state);
274
7.35k
}
275
276
6.38M
Status OperatorXBase::close(RuntimeState* state) {
277
6.38M
    if (_child && !is_source()) {
278
1.22M
        RETURN_IF_ERROR(_child->close(state));
279
1.22M
    }
280
6.38M
    auto result = state->get_local_state_result(operator_id());
281
6.38M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.38M
    return result.value()->close(state);
285
6.38M
}
286
287
302k
void PipelineXLocalStateBase::clear_origin_block() {
288
302k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
302k
}
290
291
589k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
589k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
589k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
589k
    return Status::OK();
296
589k
}
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
302k
                                     Block* output_block) const {
305
302k
    auto* local_state = state->get_local_state(operator_id());
306
302k
    SCOPED_TIMER(local_state->exec_time_counter());
307
302k
    SCOPED_TIMER(local_state->_projection_timer);
308
302k
    const size_t rows = origin_block->rows();
309
302k
    if (rows == 0) {
310
168k
        return Status::OK();
311
168k
    }
312
133k
    Block input_block = *origin_block;
313
314
133k
    size_t bytes_usage = 0;
315
133k
    ColumnsWithTypeAndName new_columns;
316
133k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.39k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.39k
        new_columns.resize(projections.size());
322
10.2k
        for (int i = 0; i < projections.size(); i++) {
323
8.83k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
8.83k
            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
8.83k
        }
332
1.39k
        Block tmp_block {new_columns};
333
1.39k
        bytes_usage += tmp_block.allocated_bytes();
334
1.39k
        input_block.swap(tmp_block);
335
1.39k
    }
336
337
133k
    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
639k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
639k
        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
639k
        } else {
354
639k
            if (_keep_origin || !from->is_exclusive()) {
355
626k
                to->insert_range_from(*from, 0, rows);
356
626k
                bytes_usage += from->allocated_bytes();
357
626k
            } else {
358
12.8k
                to = from->assume_mutable();
359
12.8k
            }
360
639k
        }
361
639k
    };
362
363
133k
    MutableBlock mutable_block =
364
133k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
133k
    if (rows != 0) {
366
133k
        auto& mutable_columns = mutable_block.mutable_columns();
367
133k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
368
772k
        for (int i = 0; i < mutable_columns.size(); ++i) {
369
639k
            ColumnPtr column_ptr;
370
639k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
639k
            if (column_ptr->size() != rows) {
372
0
                return Status::InternalError(
373
0
                        "projection result column size {} not equal input rows {}, expr: {}",
374
0
                        column_ptr->size(), rows,
375
0
                        local_state->_projections[i]->root()->debug_string());
376
0
            }
377
639k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
639k
            bytes_usage += column_ptr->allocated_bytes();
379
639k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
380
639k
        }
381
133k
        DCHECK(mutable_block.rows() == rows);
382
133k
        output_block->set_columns(std::move(mutable_columns));
383
133k
    }
384
385
133k
    local_state->_estimate_memory_usage += bytes_usage;
386
387
133k
    return Status::OK();
388
133k
}
389
390
4.06M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
391
4.06M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
392
4.06M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
393
4.06M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
394
4.06M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
395
4.06M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
396
4.06M
            if (_debug_point_count++ % 2 == 0) {
397
4.06M
                return Status::OK();
398
4.06M
            }
399
4.06M
        }
400
4.06M
    });
401
402
4.06M
    Status status;
403
4.06M
    auto* local_state = state->get_local_state(operator_id());
404
4.06M
    Defer defer([&]() {
405
4.06M
        if (status.ok()) {
406
4.06M
            if (auto rows = block->rows()) {
407
863k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
408
863k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
409
863k
            }
410
4.06M
        }
411
4.06M
    });
412
4.06M
    if (_output_row_descriptor) {
413
302k
        local_state->clear_origin_block();
414
302k
        status = get_block(state, &local_state->_origin_block, eos);
415
302k
        if (UNLIKELY(!status.ok())) {
416
19
            return status;
417
19
        }
418
301k
        status = do_projections(state, &local_state->_origin_block, block);
419
301k
        return status;
420
302k
    }
421
3.76M
    status = get_block(state, block, eos);
422
3.76M
    RETURN_IF_ERROR(block->check_type_and_column());
423
3.76M
    return status;
424
3.76M
}
425
426
3.02M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
427
3.02M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
428
7.43k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
429
7.43k
        *eos = true;
430
7.43k
    }
431
432
3.02M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
433
3.02M
        auto op_name = to_lower(_parent->_op_name);
434
3.02M
        auto arg_op_name = dp->param<std::string>("op_name");
435
3.02M
        arg_op_name = to_lower(arg_op_name);
436
437
3.02M
        if (op_name == arg_op_name) {
438
3.02M
            *eos = true;
439
3.02M
        }
440
3.02M
    });
441
442
3.02M
    if (auto rows = block->rows()) {
443
816k
        _num_rows_returned += rows;
444
816k
    }
445
3.02M
}
446
447
29.3k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
448
29.3k
    auto result = state->get_sink_local_state_result();
449
29.3k
    if (!result) {
450
0
        return result.error();
451
0
    }
452
29.3k
    return result.value()->terminate(state);
453
29.3k
}
454
455
55.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
456
55.2k
    fmt::memory_buffer debug_string_buffer;
457
458
55.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
459
55.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
460
55.2k
    return fmt::to_string(debug_string_buffer);
461
55.2k
}
462
463
55.1k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
464
55.1k
    return state->get_sink_local_state()->debug_string(indentation_level);
465
55.1k
}
466
467
436k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
468
436k
    std::string op_name = "UNKNOWN_SINK";
469
436k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
470
471
436k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
472
435k
        op_name = it->second;
473
435k
    }
474
436k
    _name = op_name + "_OPERATOR";
475
436k
    return Status::OK();
476
436k
}
477
478
195k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
479
195k
    std::string op_name = print_plan_node_type(tnode.node_type);
480
195k
    _nereids_id = tnode.nereids_id;
481
195k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
482
195k
    _name = substr + "_SINK_OPERATOR";
483
195k
    return Status::OK();
484
195k
}
485
486
template <typename LocalStateType>
487
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
488
2.07M
                                                            LocalSinkStateInfo& info) {
489
2.07M
    auto local_state = LocalStateType::create_unique(this, state);
490
2.07M
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.07M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.07M
    return Status::OK();
493
2.07M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
145k
                                                            LocalSinkStateInfo& info) {
489
145k
    auto local_state = LocalStateType::create_unique(this, state);
490
145k
    RETURN_IF_ERROR(local_state->init(state, info));
491
145k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
145k
    return Status::OK();
493
145k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
437k
                                                            LocalSinkStateInfo& info) {
489
437k
    auto local_state = LocalStateType::create_unique(this, state);
490
437k
    RETURN_IF_ERROR(local_state->init(state, info));
491
437k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
437k
    return Status::OK();
493
437k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
80
                                                            LocalSinkStateInfo& info) {
489
80
    auto local_state = LocalStateType::create_unique(this, state);
490
80
    RETURN_IF_ERROR(local_state->init(state, info));
491
80
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
80
    return Status::OK();
493
80
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
3
                                                            LocalSinkStateInfo& info) {
489
3
    auto local_state = LocalStateType::create_unique(this, state);
490
3
    RETURN_IF_ERROR(local_state->init(state, info));
491
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
3
    return Status::OK();
493
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
524
                                                            LocalSinkStateInfo& info) {
489
524
    auto local_state = LocalStateType::create_unique(this, state);
490
524
    RETURN_IF_ERROR(local_state->init(state, info));
491
524
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
524
    return Status::OK();
493
524
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
52.2k
                                                            LocalSinkStateInfo& info) {
489
52.2k
    auto local_state = LocalStateType::create_unique(this, state);
490
52.2k
    RETURN_IF_ERROR(local_state->init(state, info));
491
52.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
52.2k
    return Status::OK();
493
52.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
5.46k
                                                            LocalSinkStateInfo& info) {
489
5.46k
    auto local_state = LocalStateType::create_unique(this, state);
490
5.46k
    RETURN_IF_ERROR(local_state->init(state, info));
491
5.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
5.46k
    return Status::OK();
493
5.46k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
5.14k
                                                            LocalSinkStateInfo& info) {
489
5.14k
    auto local_state = LocalStateType::create_unique(this, state);
490
5.14k
    RETURN_IF_ERROR(local_state->init(state, info));
491
5.14k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
5.14k
    return Status::OK();
493
5.14k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
156
                                                            LocalSinkStateInfo& info) {
489
156
    auto local_state = LocalStateType::create_unique(this, state);
490
156
    RETURN_IF_ERROR(local_state->init(state, info));
491
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
156
    return Status::OK();
493
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
3.38k
                                                            LocalSinkStateInfo& info) {
489
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
490
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
491
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
3.38k
    return Status::OK();
493
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
160
                                                            LocalSinkStateInfo& info) {
489
160
    auto local_state = LocalStateType::create_unique(this, state);
490
160
    RETURN_IF_ERROR(local_state->init(state, info));
491
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
160
    return Status::OK();
493
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
640
                                                            LocalSinkStateInfo& info) {
489
640
    auto local_state = LocalStateType::create_unique(this, state);
490
640
    RETURN_IF_ERROR(local_state->init(state, info));
491
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
640
    return Status::OK();
493
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
6.86k
                                                            LocalSinkStateInfo& info) {
489
6.86k
    auto local_state = LocalStateType::create_unique(this, state);
490
6.86k
    RETURN_IF_ERROR(local_state->init(state, info));
491
6.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
6.86k
    return Status::OK();
493
6.86k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
101
                                                            LocalSinkStateInfo& info) {
489
101
    auto local_state = LocalStateType::create_unique(this, state);
490
101
    RETURN_IF_ERROR(local_state->init(state, info));
491
101
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
101
    return Status::OK();
493
101
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
266k
                                                            LocalSinkStateInfo& info) {
489
266k
    auto local_state = LocalStateType::create_unique(this, state);
490
266k
    RETURN_IF_ERROR(local_state->init(state, info));
491
266k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
266k
    return Status::OK();
493
266k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
27
                                                            LocalSinkStateInfo& info) {
489
27
    auto local_state = LocalStateType::create_unique(this, state);
490
27
    RETURN_IF_ERROR(local_state->init(state, info));
491
27
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
27
    return Status::OK();
493
27
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
303k
                                                            LocalSinkStateInfo& info) {
489
303k
    auto local_state = LocalStateType::create_unique(this, state);
490
303k
    RETURN_IF_ERROR(local_state->init(state, info));
491
303k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
303k
    return Status::OK();
493
303k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
136k
                                                            LocalSinkStateInfo& info) {
489
136k
    auto local_state = LocalStateType::create_unique(this, state);
490
136k
    RETURN_IF_ERROR(local_state->init(state, info));
491
136k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
136k
    return Status::OK();
493
136k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
22
                                                            LocalSinkStateInfo& info) {
489
22
    auto local_state = LocalStateType::create_unique(this, state);
490
22
    RETURN_IF_ERROR(local_state->init(state, info));
491
22
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
22
    return Status::OK();
493
22
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
675k
                                                            LocalSinkStateInfo& info) {
489
675k
    auto local_state = LocalStateType::create_unique(this, state);
490
675k
    RETURN_IF_ERROR(local_state->init(state, info));
491
675k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
675k
    return Status::OK();
493
675k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
8.98k
                                                            LocalSinkStateInfo& info) {
489
8.98k
    auto local_state = LocalStateType::create_unique(this, state);
490
8.98k
    RETURN_IF_ERROR(local_state->init(state, info));
491
8.98k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
8.98k
    return Status::OK();
493
8.98k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
7.35k
                                                            LocalSinkStateInfo& info) {
489
7.35k
    auto local_state = LocalStateType::create_unique(this, state);
490
7.35k
    RETURN_IF_ERROR(local_state->init(state, info));
491
7.35k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
7.35k
    return Status::OK();
493
7.35k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
4.08k
                                                            LocalSinkStateInfo& info) {
489
4.08k
    auto local_state = LocalStateType::create_unique(this, state);
490
4.08k
    RETURN_IF_ERROR(local_state->init(state, info));
491
4.08k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
4.08k
    return Status::OK();
493
4.08k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
287
                                                            LocalSinkStateInfo& info) {
489
287
    auto local_state = LocalStateType::create_unique(this, state);
490
287
    RETURN_IF_ERROR(local_state->init(state, info));
491
287
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
287
    return Status::OK();
493
287
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
4.57k
                                                            LocalSinkStateInfo& info) {
489
4.57k
    auto local_state = LocalStateType::create_unique(this, state);
490
4.57k
    RETURN_IF_ERROR(local_state->init(state, info));
491
4.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
4.57k
    return Status::OK();
493
4.57k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
2.43k
                                                            LocalSinkStateInfo& info) {
489
2.43k
    auto local_state = LocalStateType::create_unique(this, state);
490
2.43k
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.43k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.43k
    return Status::OK();
493
2.43k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
2.36k
                                                            LocalSinkStateInfo& info) {
489
2.36k
    auto local_state = LocalStateType::create_unique(this, state);
490
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.36k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.36k
    return Status::OK();
493
2.36k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
2.39k
                                                            LocalSinkStateInfo& info) {
489
2.39k
    auto local_state = LocalStateType::create_unique(this, state);
490
2.39k
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.39k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.39k
    return Status::OK();
493
2.39k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
1
                                                            LocalSinkStateInfo& info) {
489
1
    auto local_state = LocalStateType::create_unique(this, state);
490
1
    RETURN_IF_ERROR(local_state->init(state, info));
491
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
1
    return Status::OK();
493
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
165
                                                            LocalSinkStateInfo& info) {
489
165
    auto local_state = LocalStateType::create_unique(this, state);
490
165
    RETURN_IF_ERROR(local_state->init(state, info));
491
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
165
    return Status::OK();
493
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
14
                                                            LocalSinkStateInfo& info) {
489
14
    auto local_state = LocalStateType::create_unique(this, state);
490
14
    RETURN_IF_ERROR(local_state->init(state, info));
491
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
14
    return Status::OK();
493
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
105
                                                            LocalSinkStateInfo& info) {
489
105
    auto local_state = LocalStateType::create_unique(this, state);
490
105
    RETURN_IF_ERROR(local_state->init(state, info));
491
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
105
    return Status::OK();
493
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
151
                                                            LocalSinkStateInfo& info) {
489
151
    auto local_state = LocalStateType::create_unique(this, state);
490
151
    RETURN_IF_ERROR(local_state->init(state, info));
491
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
151
    return Status::OK();
493
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
151
                                                            LocalSinkStateInfo& info) {
489
151
    auto local_state = LocalStateType::create_unique(this, state);
490
151
    RETURN_IF_ERROR(local_state->init(state, info));
491
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
151
    return Status::OK();
493
151
}
494
495
template <typename LocalStateType>
496
1.73M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
0
                                 LocalExchangeSharedState>) {
499
0
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
0
                                        MultiCastSharedState>) {
502
0
        throw Exception(Status::FatalError("should not reach here!"));
503
1.73M
    } else {
504
1.73M
        auto ss = LocalStateType::SharedStateType::create_shared();
505
1.73M
        ss->id = operator_id();
506
1.73M
        for (auto& dest : dests_id()) {
507
1.72M
            ss->related_op_ids.insert(dest);
508
1.72M
        }
509
1.73M
        return ss;
510
1.73M
    }
511
1.73M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
128k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
128k
    } else {
504
128k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
128k
        ss->id = operator_id();
506
128k
        for (auto& dest : dests_id()) {
507
127k
            ss->related_op_ids.insert(dest);
508
127k
        }
509
128k
        return ss;
510
128k
    }
511
128k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
437k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
437k
    } else {
504
437k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
437k
        ss->id = operator_id();
506
437k
        for (auto& dest : dests_id()) {
507
436k
            ss->related_op_ids.insert(dest);
508
436k
        }
509
437k
        return ss;
510
437k
    }
511
437k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
80
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
80
    } else {
504
80
        auto ss = LocalStateType::SharedStateType::create_shared();
505
80
        ss->id = operator_id();
506
80
        for (auto& dest : dests_id()) {
507
80
            ss->related_op_ids.insert(dest);
508
80
        }
509
80
        return ss;
510
80
    }
511
80
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
3
    } else {
504
3
        auto ss = LocalStateType::SharedStateType::create_shared();
505
3
        ss->id = operator_id();
506
3
        for (auto& dest : dests_id()) {
507
3
            ss->related_op_ids.insert(dest);
508
3
        }
509
3
        return ss;
510
3
    }
511
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
524
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
524
    } else {
504
524
        auto ss = LocalStateType::SharedStateType::create_shared();
505
524
        ss->id = operator_id();
506
524
        for (auto& dest : dests_id()) {
507
523
            ss->related_op_ids.insert(dest);
508
523
        }
509
524
        return ss;
510
524
    }
511
524
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
51.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
51.1k
    } else {
504
51.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
51.1k
        ss->id = operator_id();
506
51.1k
        for (auto& dest : dests_id()) {
507
51.0k
            ss->related_op_ids.insert(dest);
508
51.0k
        }
509
51.1k
        return ss;
510
51.1k
    }
511
51.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
496
4.96k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
4.96k
    } else {
504
4.96k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
4.96k
        ss->id = operator_id();
506
4.96k
        for (auto& dest : dests_id()) {
507
4.96k
            ss->related_op_ids.insert(dest);
508
4.96k
        }
509
4.96k
        return ss;
510
4.96k
    }
511
4.96k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
5.14k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
5.14k
    } else {
504
5.14k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
5.14k
        ss->id = operator_id();
506
5.14k
        for (auto& dest : dests_id()) {
507
5.14k
            ss->related_op_ids.insert(dest);
508
5.14k
        }
509
5.14k
        return ss;
510
5.14k
    }
511
5.14k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
156
    } else {
504
156
        auto ss = LocalStateType::SharedStateType::create_shared();
505
156
        ss->id = operator_id();
506
156
        for (auto& dest : dests_id()) {
507
156
            ss->related_op_ids.insert(dest);
508
156
        }
509
156
        return ss;
510
156
    }
511
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
3.38k
    } else {
504
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
3.38k
        ss->id = operator_id();
506
3.38k
        for (auto& dest : dests_id()) {
507
3.38k
            ss->related_op_ids.insert(dest);
508
3.38k
        }
509
3.38k
        return ss;
510
3.38k
    }
511
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
160
    } else {
504
160
        auto ss = LocalStateType::SharedStateType::create_shared();
505
160
        ss->id = operator_id();
506
160
        for (auto& dest : dests_id()) {
507
160
            ss->related_op_ids.insert(dest);
508
160
        }
509
160
        return ss;
510
160
    }
511
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
640
    } else {
504
640
        auto ss = LocalStateType::SharedStateType::create_shared();
505
640
        ss->id = operator_id();
506
640
        for (auto& dest : dests_id()) {
507
640
            ss->related_op_ids.insert(dest);
508
640
        }
509
640
        return ss;
510
640
    }
511
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
6.86k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
6.86k
    } else {
504
6.86k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
6.86k
        ss->id = operator_id();
506
6.86k
        for (auto& dest : dests_id()) {
507
6.86k
            ss->related_op_ids.insert(dest);
508
6.86k
        }
509
6.86k
        return ss;
510
6.86k
    }
511
6.86k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
101
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
101
    } else {
504
101
        auto ss = LocalStateType::SharedStateType::create_shared();
505
101
        ss->id = operator_id();
506
101
        for (auto& dest : dests_id()) {
507
101
            ss->related_op_ids.insert(dest);
508
101
        }
509
101
        return ss;
510
101
    }
511
101
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
266k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
266k
    } else {
504
266k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
266k
        ss->id = operator_id();
506
266k
        for (auto& dest : dests_id()) {
507
265k
            ss->related_op_ids.insert(dest);
508
265k
        }
509
266k
        return ss;
510
266k
    }
511
266k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
29
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
29
    } else {
504
29
        auto ss = LocalStateType::SharedStateType::create_shared();
505
29
        ss->id = operator_id();
506
29
        for (auto& dest : dests_id()) {
507
29
            ss->related_op_ids.insert(dest);
508
29
        }
509
29
        return ss;
510
29
    }
511
29
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
137k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
137k
    } else {
504
137k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
137k
        ss->id = operator_id();
506
137k
        for (auto& dest : dests_id()) {
507
137k
            ss->related_op_ids.insert(dest);
508
137k
        }
509
137k
        return ss;
510
137k
    }
511
137k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
21
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
21
    } else {
504
21
        auto ss = LocalStateType::SharedStateType::create_shared();
505
21
        ss->id = operator_id();
506
21
        for (auto& dest : dests_id()) {
507
21
            ss->related_op_ids.insert(dest);
508
21
        }
509
21
        return ss;
510
21
    }
511
21
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
674k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
674k
    } else {
504
674k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
674k
        ss->id = operator_id();
506
674k
        for (auto& dest : dests_id()) {
507
674k
            ss->related_op_ids.insert(dest);
508
674k
        }
509
674k
        return ss;
510
674k
    }
511
674k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
8.98k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
8.98k
    } else {
504
8.98k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
8.98k
        ss->id = operator_id();
506
8.98k
        for (auto& dest : dests_id()) {
507
8.97k
            ss->related_op_ids.insert(dest);
508
8.97k
        }
509
8.98k
        return ss;
510
8.98k
    }
511
8.98k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
391
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
391
    } else {
504
391
        auto ss = LocalStateType::SharedStateType::create_shared();
505
391
        ss->id = operator_id();
506
391
        for (auto& dest : dests_id()) {
507
389
            ss->related_op_ids.insert(dest);
508
389
        }
509
391
        return ss;
510
391
    }
511
391
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
496
2.36k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
2.36k
    } else {
504
2.36k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
2.36k
        ss->id = operator_id();
506
2.36k
        for (auto& dest : dests_id()) {
507
2.36k
            ss->related_op_ids.insert(dest);
508
2.36k
        }
509
2.36k
        return ss;
510
2.36k
    }
511
2.36k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
496
2.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
2.38k
    } else {
504
2.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
2.38k
        ss->id = operator_id();
506
2.38k
        for (auto& dest : dests_id()) {
507
2.38k
            ss->related_op_ids.insert(dest);
508
2.38k
        }
509
2.38k
        return ss;
510
2.38k
    }
511
2.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
165
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
165
    } else {
504
165
        auto ss = LocalStateType::SharedStateType::create_shared();
505
165
        ss->id = operator_id();
506
165
        for (auto& dest : dests_id()) {
507
165
            ss->related_op_ids.insert(dest);
508
165
        }
509
165
        return ss;
510
165
    }
511
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
105
    } else {
504
105
        auto ss = LocalStateType::SharedStateType::create_shared();
505
105
        ss->id = operator_id();
506
105
        for (auto& dest : dests_id()) {
507
105
            ss->related_op_ids.insert(dest);
508
105
        }
509
105
        return ss;
510
105
    }
511
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
512
513
template <typename LocalStateType>
514
2.60M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.60M
    auto local_state = LocalStateType::create_unique(state, this);
516
2.60M
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.60M
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.60M
    return Status::OK();
519
2.60M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
97.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
97.6k
    auto local_state = LocalStateType::create_unique(state, this);
516
97.6k
    RETURN_IF_ERROR(local_state->init(state, info));
517
97.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
97.6k
    return Status::OK();
519
97.6k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
307k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
307k
    auto local_state = LocalStateType::create_unique(state, this);
516
307k
    RETURN_IF_ERROR(local_state->init(state, info));
517
307k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
307k
    return Status::OK();
519
307k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
76
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
76
    auto local_state = LocalStateType::create_unique(state, this);
516
76
    RETURN_IF_ERROR(local_state->init(state, info));
517
76
    state->emplace_local_state(operator_id(), std::move(local_state));
518
76
    return Status::OK();
519
76
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
31.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
31.0k
    auto local_state = LocalStateType::create_unique(state, this);
516
31.0k
    RETURN_IF_ERROR(local_state->init(state, info));
517
31.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
31.0k
    return Status::OK();
519
31.0k
}
_ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
592
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
592
    auto local_state = LocalStateType::create_unique(state, this);
516
592
    RETURN_IF_ERROR(local_state->init(state, info));
517
592
    state->emplace_local_state(operator_id(), std::move(local_state));
518
592
    return Status::OK();
519
592
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
6.80k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
6.80k
    auto local_state = LocalStateType::create_unique(state, this);
516
6.80k
    RETURN_IF_ERROR(local_state->init(state, info));
517
6.80k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
6.80k
    return Status::OK();
519
6.80k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
7.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
7.33k
    auto local_state = LocalStateType::create_unique(state, this);
516
7.33k
    RETURN_IF_ERROR(local_state->init(state, info));
517
7.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
7.33k
    return Status::OK();
519
7.33k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
21
    auto local_state = LocalStateType::create_unique(state, this);
516
21
    RETURN_IF_ERROR(local_state->init(state, info));
517
21
    state->emplace_local_state(operator_id(), std::move(local_state));
518
21
    return Status::OK();
519
21
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
257k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
257k
    auto local_state = LocalStateType::create_unique(state, this);
516
257k
    RETURN_IF_ERROR(local_state->init(state, info));
517
257k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
257k
    return Status::OK();
519
257k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
136k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
136k
    auto local_state = LocalStateType::create_unique(state, this);
516
136k
    RETURN_IF_ERROR(local_state->init(state, info));
517
136k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
136k
    return Status::OK();
519
136k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
12
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
12
    auto local_state = LocalStateType::create_unique(state, this);
516
12
    RETURN_IF_ERROR(local_state->init(state, info));
517
12
    state->emplace_local_state(operator_id(), std::move(local_state));
518
12
    return Status::OK();
519
12
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
3.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
3.72k
    auto local_state = LocalStateType::create_unique(state, this);
516
3.72k
    RETURN_IF_ERROR(local_state->init(state, info));
517
3.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
3.72k
    return Status::OK();
519
3.72k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
405k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
405k
    auto local_state = LocalStateType::create_unique(state, this);
516
405k
    RETURN_IF_ERROR(local_state->init(state, info));
517
405k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
405k
    return Status::OK();
519
405k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
794
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
794
    auto local_state = LocalStateType::create_unique(state, this);
516
794
    RETURN_IF_ERROR(local_state->init(state, info));
517
794
    state->emplace_local_state(operator_id(), std::move(local_state));
518
794
    return Status::OK();
519
794
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
8.94k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
8.94k
    auto local_state = LocalStateType::create_unique(state, this);
516
8.94k
    RETURN_IF_ERROR(local_state->init(state, info));
517
8.94k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
8.94k
    return Status::OK();
519
8.94k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
221
    auto local_state = LocalStateType::create_unique(state, this);
516
221
    RETURN_IF_ERROR(local_state->init(state, info));
517
221
    state->emplace_local_state(operator_id(), std::move(local_state));
518
221
    return Status::OK();
519
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.54k
    return Status::OK();
519
1.54k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
53.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
53.7k
    auto local_state = LocalStateType::create_unique(state, this);
516
53.7k
    RETURN_IF_ERROR(local_state->init(state, info));
517
53.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
53.7k
    return Status::OK();
519
53.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
516
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
517
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
10.7k
    return Status::OK();
519
10.7k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
279
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
279
    auto local_state = LocalStateType::create_unique(state, this);
516
279
    RETURN_IF_ERROR(local_state->init(state, info));
517
279
    state->emplace_local_state(operator_id(), std::move(local_state));
518
279
    return Status::OK();
519
279
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.26k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.26k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.26k
    return Status::OK();
519
2.26k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.28k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.28k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.28k
    return Status::OK();
519
2.28k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
461
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
461
    auto local_state = LocalStateType::create_unique(state, this);
516
461
    RETURN_IF_ERROR(local_state->init(state, info));
517
461
    state->emplace_local_state(operator_id(), std::move(local_state));
518
461
    return Status::OK();
519
461
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.28k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.28k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.28k
    return Status::OK();
519
2.28k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
7.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
7.11k
    auto local_state = LocalStateType::create_unique(state, this);
516
7.11k
    RETURN_IF_ERROR(local_state->init(state, info));
517
7.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
7.11k
    return Status::OK();
519
7.11k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
762k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
762k
    auto local_state = LocalStateType::create_unique(state, this);
516
762k
    RETURN_IF_ERROR(local_state->init(state, info));
517
762k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
762k
    return Status::OK();
519
762k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
14
    auto local_state = LocalStateType::create_unique(state, this);
516
14
    RETURN_IF_ERROR(local_state->init(state, info));
517
14
    state->emplace_local_state(operator_id(), std::move(local_state));
518
14
    return Status::OK();
519
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
151
    auto local_state = LocalStateType::create_unique(state, this);
516
151
    RETURN_IF_ERROR(local_state->init(state, info));
517
151
    state->emplace_local_state(operator_id(), std::move(local_state));
518
151
    return Status::OK();
519
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.95k
    return Status::OK();
519
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.60k
    return Status::OK();
519
1.60k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.04k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.04k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.04k
    return Status::OK();
519
2.04k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
12.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
12.3k
    auto local_state = LocalStateType::create_unique(state, this);
516
12.3k
    RETURN_IF_ERROR(local_state->init(state, info));
517
12.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
12.3k
    return Status::OK();
519
12.3k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
477k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
477k
    auto local_state = LocalStateType::create_unique(state, this);
516
477k
    RETURN_IF_ERROR(local_state->init(state, info));
517
477k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
477k
    return Status::OK();
519
477k
}
520
521
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
522
                                                         RuntimeState* state)
523
2.07M
        : _parent(parent), _state(state) {}
524
525
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
526
2.60M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
527
528
template <typename SharedStateArg>
529
2.60M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
2.60M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
2.60M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
2.60M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
2.60M
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
2.60M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
2.60M
    _operator_profile->add_child(_common_profile.get(), true);
538
2.60M
    _operator_profile->add_child(_custom_profile.get(), true);
539
2.60M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
2.60M
    if constexpr (!is_fake_shared) {
541
1.34M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
777k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
777k
                                    .first.get()
544
777k
                                    ->template cast<SharedStateArg>();
545
546
777k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
777k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
777k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
777k
        } else if (info.shared_state) {
550
511k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
0
                DCHECK(false);
552
0
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
511k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
511k
            _dependency = _shared_state->create_source_dependency(
557
511k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
511k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
511k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
511k
        } else {
561
58.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
2.01k
                DCHECK(false);
563
2.01k
            }
564
58.0k
        }
565
1.34M
    }
566
567
2.60M
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
2.60M
    _rows_returned_counter =
572
2.60M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
2.60M
    _blocks_returned_counter =
574
2.60M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
2.60M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
2.60M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
2.60M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
2.60M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
2.60M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
2.60M
    _memory_used_counter =
581
2.60M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
2.60M
    _common_profile->add_info_string("IsColocate",
583
2.60M
                                     std::to_string(_parent->is_colocated_operator()));
584
2.60M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
2.60M
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
2.60M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
2.60M
    return Status::OK();
588
2.60M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
97.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
97.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
97.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
97.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
97.8k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
97.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
97.8k
    _operator_profile->add_child(_common_profile.get(), true);
538
97.8k
    _operator_profile->add_child(_custom_profile.get(), true);
539
97.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
97.8k
    if constexpr (!is_fake_shared) {
541
97.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
17.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
17.5k
                                    .first.get()
544
17.5k
                                    ->template cast<SharedStateArg>();
545
546
17.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
17.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
17.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
80.2k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
79.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
79.5k
            _dependency = _shared_state->create_source_dependency(
557
79.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
79.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
79.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
79.5k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
679
        }
565
97.8k
    }
566
567
97.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
97.8k
    _rows_returned_counter =
572
97.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
97.8k
    _blocks_returned_counter =
574
97.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
97.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
97.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
97.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
97.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
97.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
97.8k
    _memory_used_counter =
581
97.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
97.8k
    _common_profile->add_info_string("IsColocate",
583
97.8k
                                     std::to_string(_parent->is_colocated_operator()));
584
97.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
97.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
97.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
97.8k
    return Status::OK();
588
97.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
1
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
1
    _operator_profile->add_child(_common_profile.get(), true);
538
1
    _operator_profile->add_child(_custom_profile.get(), true);
539
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
1
    if constexpr (!is_fake_shared) {
541
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
1
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
1
            _dependency = _shared_state->create_source_dependency(
557
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
1
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
1
    }
566
567
1
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
1
    _rows_returned_counter =
572
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
1
    _blocks_returned_counter =
574
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
1
    _memory_used_counter =
581
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
1
    _common_profile->add_info_string("IsColocate",
583
1
                                     std::to_string(_parent->is_colocated_operator()));
584
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
1
    return Status::OK();
588
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
265k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
265k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
265k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
265k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
265k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
265k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
265k
    _operator_profile->add_child(_common_profile.get(), true);
538
265k
    _operator_profile->add_child(_custom_profile.get(), true);
539
265k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
265k
    if constexpr (!is_fake_shared) {
541
265k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
265k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
260k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
260k
            _dependency = _shared_state->create_source_dependency(
557
260k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
260k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
260k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
260k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
4.54k
        }
565
265k
    }
566
567
265k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
265k
    _rows_returned_counter =
572
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
265k
    _blocks_returned_counter =
574
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
265k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
265k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
265k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
265k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
265k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
265k
    _memory_used_counter =
581
265k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
265k
    _common_profile->add_info_string("IsColocate",
583
265k
                                     std::to_string(_parent->is_colocated_operator()));
584
265k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
265k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
265k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
265k
    return Status::OK();
588
265k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
21
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
21
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
21
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
21
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
21
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
21
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
21
    _operator_profile->add_child(_common_profile.get(), true);
538
21
    _operator_profile->add_child(_custom_profile.get(), true);
539
21
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
21
    if constexpr (!is_fake_shared) {
541
21
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
21
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
21
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
21
            _dependency = _shared_state->create_source_dependency(
557
21
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
21
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
21
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
21
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
21
    }
566
567
21
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
21
    _rows_returned_counter =
572
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
21
    _blocks_returned_counter =
574
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
21
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
21
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
21
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
21
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
21
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
21
    _memory_used_counter =
581
21
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
21
    _common_profile->add_info_string("IsColocate",
583
21
                                     std::to_string(_parent->is_colocated_operator()));
584
21
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
21
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
21
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
21
    return Status::OK();
588
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.93k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
8.93k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
8.93k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
8.93k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
8.93k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
8.93k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
8.93k
    _operator_profile->add_child(_common_profile.get(), true);
538
8.93k
    _operator_profile->add_child(_custom_profile.get(), true);
539
8.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
8.93k
    if constexpr (!is_fake_shared) {
541
8.93k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
8.94k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
8.94k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
8.94k
            _dependency = _shared_state->create_source_dependency(
557
8.94k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
8.94k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
8.94k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
18.4E
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
18.4E
        }
565
8.93k
    }
566
567
8.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
8.93k
    _rows_returned_counter =
572
8.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
8.93k
    _blocks_returned_counter =
574
8.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
8.93k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
8.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
8.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
8.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
8.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
8.93k
    _memory_used_counter =
581
8.93k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
8.93k
    _common_profile->add_info_string("IsColocate",
583
8.93k
                                     std::to_string(_parent->is_colocated_operator()));
584
8.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
8.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
8.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
8.93k
    return Status::OK();
588
8.93k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.81k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
6.81k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
6.81k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
6.81k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
6.81k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
6.81k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
6.81k
    _operator_profile->add_child(_common_profile.get(), true);
538
6.81k
    _operator_profile->add_child(_custom_profile.get(), true);
539
6.81k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
6.81k
    if constexpr (!is_fake_shared) {
541
6.81k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
6.81k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
6.76k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
6.76k
            _dependency = _shared_state->create_source_dependency(
557
6.76k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
6.76k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
6.76k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
6.76k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
54
        }
565
6.81k
    }
566
567
6.81k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
6.81k
    _rows_returned_counter =
572
6.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
6.81k
    _blocks_returned_counter =
574
6.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
6.81k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
6.81k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
6.81k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
6.81k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
6.81k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
6.81k
    _memory_used_counter =
581
6.81k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
6.81k
    _common_profile->add_info_string("IsColocate",
583
6.81k
                                     std::to_string(_parent->is_colocated_operator()));
584
6.81k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
6.81k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
6.81k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
6.81k
    return Status::OK();
588
6.81k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
136k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
136k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
136k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
136k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
136k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
136k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
136k
    _operator_profile->add_child(_common_profile.get(), true);
538
136k
    _operator_profile->add_child(_custom_profile.get(), true);
539
136k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
136k
    if constexpr (!is_fake_shared) {
541
136k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
136k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
136k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
136k
            _dependency = _shared_state->create_source_dependency(
557
136k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
136k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
136k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
136k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
450
        }
565
136k
    }
566
567
136k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
136k
    _rows_returned_counter =
572
136k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
136k
    _blocks_returned_counter =
574
136k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
136k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
136k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
136k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
136k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
136k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
136k
    _memory_used_counter =
581
136k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
136k
    _common_profile->add_info_string("IsColocate",
583
136k
                                     std::to_string(_parent->is_colocated_operator()));
584
136k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
136k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
136k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
136k
    return Status::OK();
588
136k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
12
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
12
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
12
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
12
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
12
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
12
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
12
    _operator_profile->add_child(_common_profile.get(), true);
538
12
    _operator_profile->add_child(_custom_profile.get(), true);
539
12
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
12
    if constexpr (!is_fake_shared) {
541
12
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
12
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
12
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
12
            _dependency = _shared_state->create_source_dependency(
557
12
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
12
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
12
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
12
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
12
    }
566
567
12
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
12
    _rows_returned_counter =
572
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
12
    _blocks_returned_counter =
574
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
12
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
12
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
12
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
12
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
12
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
12
    _memory_used_counter =
581
12
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
12
    _common_profile->add_info_string("IsColocate",
583
12
                                     std::to_string(_parent->is_colocated_operator()));
584
12
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
12
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
12
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
12
    return Status::OK();
588
12
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.25M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
1.25M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
1.25M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
1.25M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
1.25M
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
1.25M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
1.25M
    _operator_profile->add_child(_common_profile.get(), true);
538
1.25M
    _operator_profile->add_child(_custom_profile.get(), true);
539
1.25M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
    if constexpr (!is_fake_shared) {
541
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
                                    .first.get()
544
                                    ->template cast<SharedStateArg>();
545
546
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
            _dependency = _shared_state->create_source_dependency(
557
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
        }
565
    }
566
567
1.25M
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
1.25M
    _rows_returned_counter =
572
1.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
1.25M
    _blocks_returned_counter =
574
1.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
1.25M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
1.25M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
1.25M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
1.25M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
1.25M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
1.25M
    _memory_used_counter =
581
1.25M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
1.25M
    _common_profile->add_info_string("IsColocate",
583
1.25M
                                     std::to_string(_parent->is_colocated_operator()));
584
1.25M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
1.25M
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
1.25M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
1.25M
    return Status::OK();
588
1.25M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
53.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
53.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
53.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
53.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
53.6k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
53.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
53.6k
    _operator_profile->add_child(_common_profile.get(), true);
538
53.6k
    _operator_profile->add_child(_custom_profile.get(), true);
539
53.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
53.6k
    if constexpr (!is_fake_shared) {
541
53.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
53.6k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
3.54k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
3.54k
            _dependency = _shared_state->create_source_dependency(
557
3.54k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
3.54k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
3.54k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
50.0k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
50.0k
        }
565
53.6k
    }
566
567
53.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
53.6k
    _rows_returned_counter =
572
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
53.6k
    _blocks_returned_counter =
574
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
53.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
53.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
53.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
53.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
53.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
53.6k
    _memory_used_counter =
581
53.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
53.6k
    _common_profile->add_info_string("IsColocate",
583
53.6k
                                     std::to_string(_parent->is_colocated_operator()));
584
53.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
53.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
53.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
53.6k
    return Status::OK();
588
53.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
17
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
17
    _operator_profile->add_child(_common_profile.get(), true);
538
17
    _operator_profile->add_child(_custom_profile.get(), true);
539
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
17
    if constexpr (!is_fake_shared) {
541
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
17
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
17
            _dependency = _shared_state->create_source_dependency(
557
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
17
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
17
    }
566
567
17
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
17
    _rows_returned_counter =
572
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
17
    _blocks_returned_counter =
574
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
17
    _memory_used_counter =
581
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
17
    _common_profile->add_info_string("IsColocate",
583
17
                                     std::to_string(_parent->is_colocated_operator()));
584
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
17
    return Status::OK();
588
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
10.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
10.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
10.7k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
10.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
10.7k
    _operator_profile->add_child(_common_profile.get(), true);
538
10.7k
    _operator_profile->add_child(_custom_profile.get(), true);
539
10.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
10.7k
    if constexpr (!is_fake_shared) {
541
10.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
10.7k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
10.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
10.7k
            _dependency = _shared_state->create_source_dependency(
557
10.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
10.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
10.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
10.7k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
5
        }
565
10.7k
    }
566
567
10.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
10.7k
    _rows_returned_counter =
572
10.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
10.7k
    _blocks_returned_counter =
574
10.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
10.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
10.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
10.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
10.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
10.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
10.7k
    _memory_used_counter =
581
10.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
10.7k
    _common_profile->add_info_string("IsColocate",
583
10.7k
                                     std::to_string(_parent->is_colocated_operator()));
584
10.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
10.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
10.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
10.7k
    return Status::OK();
588
10.7k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
380
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
380
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
380
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
380
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
380
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
380
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
380
    _operator_profile->add_child(_common_profile.get(), true);
538
380
    _operator_profile->add_child(_custom_profile.get(), true);
539
380
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
380
    if constexpr (!is_fake_shared) {
541
380
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
383
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
383
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
383
            _dependency = _shared_state->create_source_dependency(
557
383
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
383
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
383
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
18.4E
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
18.4E
        }
565
380
    }
566
567
380
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
380
    _rows_returned_counter =
572
380
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
380
    _blocks_returned_counter =
574
380
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
380
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
380
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
380
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
380
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
380
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
380
    _memory_used_counter =
581
380
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
380
    _common_profile->add_info_string("IsColocate",
583
380
                                     std::to_string(_parent->is_colocated_operator()));
584
380
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
380
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
380
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
380
    return Status::OK();
588
380
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.66k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
4.66k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
4.66k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
4.66k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
4.66k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
4.66k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
4.66k
    _operator_profile->add_child(_common_profile.get(), true);
538
4.66k
    _operator_profile->add_child(_custom_profile.get(), true);
539
4.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
4.66k
    if constexpr (!is_fake_shared) {
541
4.66k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
4.66k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
4.45k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
4.45k
            _dependency = _shared_state->create_source_dependency(
557
4.45k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
4.45k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
4.45k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
4.45k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
212
        }
565
4.66k
    }
566
567
4.66k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
4.66k
    _rows_returned_counter =
572
4.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
4.66k
    _blocks_returned_counter =
574
4.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
4.66k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
4.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
4.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
4.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
4.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
4.66k
    _memory_used_counter =
581
4.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
4.66k
    _common_profile->add_info_string("IsColocate",
583
4.66k
                                     std::to_string(_parent->is_colocated_operator()));
584
4.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
4.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
4.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
4.66k
    return Status::OK();
588
4.66k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
762k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
762k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
762k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
762k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
762k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
762k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
762k
    _operator_profile->add_child(_common_profile.get(), true);
538
762k
    _operator_profile->add_child(_custom_profile.get(), true);
539
762k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
762k
    if constexpr (!is_fake_shared) {
541
762k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
759k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
759k
                                    .first.get()
544
759k
                                    ->template cast<SharedStateArg>();
545
546
759k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
759k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
759k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
759k
        } else if (info.shared_state) {
550
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
0
                DCHECK(false);
552
0
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
0
            _dependency = _shared_state->create_source_dependency(
557
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
2.01k
        } else {
561
2.01k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
2.01k
                DCHECK(false);
563
2.01k
            }
564
2.01k
        }
565
762k
    }
566
567
762k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
762k
    _rows_returned_counter =
572
762k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
762k
    _blocks_returned_counter =
574
762k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
762k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
762k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
762k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
762k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
762k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
762k
    _memory_used_counter =
581
762k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
762k
    _common_profile->add_info_string("IsColocate",
583
762k
                                     std::to_string(_parent->is_colocated_operator()));
584
762k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
762k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
762k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
762k
    return Status::OK();
588
762k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
151
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
151
    _operator_profile->add_child(_common_profile.get(), true);
538
151
    _operator_profile->add_child(_custom_profile.get(), true);
539
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
151
    if constexpr (!is_fake_shared) {
541
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
151
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
151
            _dependency = _shared_state->create_source_dependency(
557
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
151
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
151
    }
566
567
151
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
151
    _rows_returned_counter =
572
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
151
    _blocks_returned_counter =
574
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
151
    _memory_used_counter =
581
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
151
    _common_profile->add_info_string("IsColocate",
583
151
                                     std::to_string(_parent->is_colocated_operator()));
584
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
151
    return Status::OK();
588
151
}
589
590
template <typename SharedStateArg>
591
2.61M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
2.61M
    _conjuncts.resize(_parent->_conjuncts.size());
593
2.61M
    _projections.resize(_parent->_projections.size());
594
3.11M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
495k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
495k
    }
597
5.45M
    for (size_t i = 0; i < _projections.size(); i++) {
598
2.84M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
2.84M
    }
600
2.61M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
2.62M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
9.78k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
65.0k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
55.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
55.2k
                    state, _intermediate_projections[i][j]));
606
55.2k
        }
607
9.78k
    }
608
2.61M
    return Status::OK();
609
2.61M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
97.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
97.9k
    _conjuncts.resize(_parent->_conjuncts.size());
593
97.9k
    _projections.resize(_parent->_projections.size());
594
99.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
1.23k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
1.23k
    }
597
484k
    for (size_t i = 0; i < _projections.size(); i++) {
598
386k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
386k
    }
600
97.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
99.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
1.33k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
14.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
12.8k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
12.8k
                    state, _intermediate_projections[i][j]));
606
12.8k
        }
607
1.33k
    }
608
97.9k
    return Status::OK();
609
97.9k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
3
    _conjuncts.resize(_parent->_conjuncts.size());
593
3
    _projections.resize(_parent->_projections.size());
594
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
3
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
3
    return Status::OK();
609
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
266k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
266k
    _conjuncts.resize(_parent->_conjuncts.size());
593
266k
    _projections.resize(_parent->_projections.size());
594
266k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
266k
    for (size_t i = 0; i < _projections.size(); i++) {
598
354
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
354
    }
600
266k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
266k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
266k
    return Status::OK();
609
266k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
21
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
21
    _conjuncts.resize(_parent->_conjuncts.size());
593
21
    _projections.resize(_parent->_projections.size());
594
21
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
21
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
21
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
21
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
21
    return Status::OK();
609
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
8.98k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
8.98k
    _conjuncts.resize(_parent->_conjuncts.size());
593
8.98k
    _projections.resize(_parent->_projections.size());
594
9.12k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
143
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
143
    }
597
51.9k
    for (size_t i = 0; i < _projections.size(); i++) {
598
42.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
42.9k
    }
600
8.98k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
9.15k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
170
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
1.06k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
898
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
898
                    state, _intermediate_projections[i][j]));
606
898
        }
607
170
    }
608
8.98k
    return Status::OK();
609
8.98k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
6.87k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
6.87k
    _conjuncts.resize(_parent->_conjuncts.size());
593
6.87k
    _projections.resize(_parent->_projections.size());
594
7.51k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
640
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
640
    }
597
16.7k
    for (size_t i = 0; i < _projections.size(); i++) {
598
9.90k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
9.90k
    }
600
6.87k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
6.95k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
87
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
654
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
567
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
567
                    state, _intermediate_projections[i][j]));
606
567
        }
607
87
    }
608
6.87k
    return Status::OK();
609
6.87k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
136k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
136k
    _conjuncts.resize(_parent->_conjuncts.size());
593
136k
    _projections.resize(_parent->_projections.size());
594
141k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
4.12k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
4.12k
    }
597
402k
    for (size_t i = 0; i < _projections.size(); i++) {
598
265k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
265k
    }
600
136k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
137k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
356
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
2.97k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
2.62k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
2.62k
                    state, _intermediate_projections[i][j]));
606
2.62k
        }
607
356
    }
608
136k
    return Status::OK();
609
136k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
16
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
16
    _conjuncts.resize(_parent->_conjuncts.size());
593
16
    _projections.resize(_parent->_projections.size());
594
16
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
16
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
16
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
16
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
16
    return Status::OK();
609
16
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
1.26M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
1.26M
    _conjuncts.resize(_parent->_conjuncts.size());
593
1.26M
    _projections.resize(_parent->_projections.size());
594
1.74M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
486k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
486k
    }
597
3.30M
    for (size_t i = 0; i < _projections.size(); i++) {
598
2.04M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
2.04M
    }
600
1.26M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
1.26M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
7.83k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
46.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
38.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
38.2k
                    state, _intermediate_projections[i][j]));
606
38.2k
        }
607
7.83k
    }
608
1.26M
    return Status::OK();
609
1.26M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
53.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
53.9k
    _conjuncts.resize(_parent->_conjuncts.size());
593
53.9k
    _projections.resize(_parent->_projections.size());
594
53.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
145k
    for (size_t i = 0; i < _projections.size(); i++) {
598
91.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
91.4k
    }
600
53.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
53.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
53.9k
    return Status::OK();
609
53.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
17
    _conjuncts.resize(_parent->_conjuncts.size());
593
17
    _projections.resize(_parent->_projections.size());
594
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
17
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
17
    return Status::OK();
609
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
10.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
10.7k
    _conjuncts.resize(_parent->_conjuncts.size());
593
10.7k
    _projections.resize(_parent->_projections.size());
594
13.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
2.64k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
2.64k
    }
597
10.7k
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
10.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
10.7k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
10.7k
    return Status::OK();
609
10.7k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
390
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
390
    _conjuncts.resize(_parent->_conjuncts.size());
593
390
    _projections.resize(_parent->_projections.size());
594
390
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
390
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
390
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
390
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
390
    return Status::OK();
609
390
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
4.80k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
4.80k
    _conjuncts.resize(_parent->_conjuncts.size());
593
4.80k
    _projections.resize(_parent->_projections.size());
594
4.80k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
4.80k
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
4.80k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
4.80k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
4.80k
    return Status::OK();
609
4.80k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
767k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
767k
    _conjuncts.resize(_parent->_conjuncts.size());
593
767k
    _projections.resize(_parent->_projections.size());
594
767k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
767k
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
767k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
767k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
767k
    return Status::OK();
609
767k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
151
    _conjuncts.resize(_parent->_conjuncts.size());
593
151
    _projections.resize(_parent->_projections.size());
594
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
7
    }
597
447
    for (size_t i = 0; i < _projections.size(); i++) {
598
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
296
    }
600
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
2
                    state, _intermediate_projections[i][j]));
606
2
        }
607
1
    }
608
151
    return Status::OK();
609
151
}
610
611
template <typename SharedStateArg>
612
7.35k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
7.35k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
7.35k
    _terminated = true;
617
7.35k
    return Status::OK();
618
7.35k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
1.35k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
1.35k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
1.35k
    _terminated = true;
617
1.35k
    return Status::OK();
618
1.35k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
166
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
166
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
166
    _terminated = true;
617
166
    return Status::OK();
618
166
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
289
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
289
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
289
    _terminated = true;
617
289
    return Status::OK();
618
289
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
158
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
158
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
158
    _terminated = true;
617
158
    return Status::OK();
618
158
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
4.22k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
4.22k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
4.22k
    _terminated = true;
617
4.22k
    return Status::OK();
618
4.22k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
5
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
5
    _terminated = true;
617
5
    return Status::OK();
618
5
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
1
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
1
    _terminated = true;
617
1
    return Status::OK();
618
1
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
4
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
4
    _terminated = true;
617
4
    return Status::OK();
618
4
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
232
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
232
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
232
    _terminated = true;
617
232
    return Status::OK();
618
232
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
909
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
909
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
909
    _terminated = true;
617
909
    return Status::OK();
618
909
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
14
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
14
    _terminated = true;
617
14
    return Status::OK();
618
14
}
619
620
template <typename SharedStateArg>
621
2.90M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
2.90M
    if (_closed) {
623
293k
        return Status::OK();
624
293k
    }
625
2.61M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
1.35M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
1.35M
    }
628
2.61M
    _closed = true;
629
2.61M
    return Status::OK();
630
2.90M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
97.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
97.9k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
97.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
97.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
97.9k
    }
628
97.9k
    _closed = true;
629
97.9k
    return Status::OK();
630
97.9k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
3
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
3
    }
628
3
    _closed = true;
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
530k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
530k
    if (_closed) {
623
265k
        return Status::OK();
624
265k
    }
625
264k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
264k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
264k
    }
628
264k
    _closed = true;
629
264k
    return Status::OK();
630
530k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
21
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
21
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
21
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
21
    }
628
21
    _closed = true;
629
21
    return Status::OK();
630
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
8.97k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
8.97k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
8.97k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
8.97k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
8.97k
    }
628
8.97k
    _closed = true;
629
8.97k
    return Status::OK();
630
8.97k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
13.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
13.7k
    if (_closed) {
623
6.94k
        return Status::OK();
624
6.94k
    }
625
6.85k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
6.85k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
6.85k
    }
628
6.85k
    _closed = true;
629
6.85k
    return Status::OK();
630
13.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
137k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
137k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
137k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
137k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
137k
    }
628
137k
    _closed = true;
629
137k
    return Status::OK();
630
137k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
11
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
11
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
11
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
11
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
11
    }
628
11
    _closed = true;
629
11
    return Status::OK();
630
11
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
1.27M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
1.27M
    if (_closed) {
623
15.9k
        return Status::OK();
624
15.9k
    }
625
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
    }
628
1.26M
    _closed = true;
629
1.26M
    return Status::OK();
630
1.27M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
54.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
54.0k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
54.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
54.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
54.0k
    }
628
54.0k
    _closed = true;
629
54.0k
    return Status::OK();
630
54.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
28
    if (_closed) {
623
14
        return Status::OK();
624
14
    }
625
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
14
    }
628
14
    _closed = true;
629
14
    return Status::OK();
630
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
10.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
10.7k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
10.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
10.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
10.7k
    }
628
10.7k
    _closed = true;
629
10.7k
    return Status::OK();
630
10.7k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
575
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
575
    if (_closed) {
623
289
        return Status::OK();
624
289
    }
625
286
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
286
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
286
    }
628
286
    _closed = true;
629
286
    return Status::OK();
630
575
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
9.60k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
9.60k
    if (_closed) {
623
4.80k
        return Status::OK();
624
4.80k
    }
625
4.79k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
4.79k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
4.79k
    }
628
4.79k
    _closed = true;
629
4.79k
    return Status::OK();
630
9.60k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
768k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
768k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
768k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
768k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
768k
    }
628
768k
    _closed = true;
629
768k
    return Status::OK();
630
768k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
304
    if (_closed) {
623
162
        return Status::OK();
624
162
    }
625
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
142
    }
628
142
    _closed = true;
629
142
    return Status::OK();
630
304
}
631
632
template <typename SharedState>
633
2.07M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
2.07M
    _operator_profile =
636
2.07M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
2.07M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
2.07M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
2.07M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
2.07M
    _operator_profile->add_child(_common_profile, true);
645
2.07M
    _operator_profile->add_child(_custom_profile, true);
646
647
2.07M
    _operator_profile->set_metadata(_parent->node_id());
648
2.07M
    _wait_for_finish_dependency_timer =
649
2.07M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
2.07M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
2.07M
    if constexpr (!is_fake_shared) {
652
1.39M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
1.39M
            info.shared_state_map.end()) {
654
322k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
303k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
303k
            }
657
322k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
322k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
322k
                                                  ? 0
660
322k
                                                  : info.task_idx]
661
322k
                                  .get();
662
322k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
1.07M
        } else {
664
1.07M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
77
                DCHECK(false);
666
77
            }
667
1.07M
            _shared_state = info.shared_state->template cast<SharedState>();
668
1.07M
            _dependency = _shared_state->create_sink_dependency(
669
1.07M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
1.07M
        }
671
1.39M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
1.39M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
1.39M
    }
674
675
2.07M
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
2.07M
    _rows_input_counter =
680
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
2.07M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
2.07M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
2.07M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
2.07M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
2.07M
    _memory_used_counter =
686
2.07M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
2.07M
    _common_profile->add_info_string("IsColocate",
688
2.07M
                                     std::to_string(_parent->is_colocated_operator()));
689
2.07M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
2.07M
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
2.07M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
2.07M
    return Status::OK();
693
2.07M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
145k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
145k
    _operator_profile =
636
145k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
145k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
145k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
145k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
145k
    _operator_profile->add_child(_common_profile, true);
645
145k
    _operator_profile->add_child(_custom_profile, true);
646
647
145k
    _operator_profile->set_metadata(_parent->node_id());
648
145k
    _wait_for_finish_dependency_timer =
649
145k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
145k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
145k
    if constexpr (!is_fake_shared) {
652
145k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
145k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
17.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
17.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
17.6k
                                                  ? 0
660
17.6k
                                                  : info.task_idx]
661
17.6k
                                  .get();
662
17.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
128k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
128k
            _shared_state = info.shared_state->template cast<SharedState>();
668
128k
            _dependency = _shared_state->create_sink_dependency(
669
128k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
128k
        }
671
145k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
145k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
145k
    }
674
675
145k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
145k
    _rows_input_counter =
680
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
145k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
145k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
145k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
145k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
145k
    _memory_used_counter =
686
145k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
145k
    _common_profile->add_info_string("IsColocate",
688
145k
                                     std::to_string(_parent->is_colocated_operator()));
689
145k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
145k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
145k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
145k
    return Status::OK();
693
145k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
2
    _operator_profile =
636
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
2
    _operator_profile->add_child(_common_profile, true);
645
2
    _operator_profile->add_child(_custom_profile, true);
646
647
2
    _operator_profile->set_metadata(_parent->node_id());
648
2
    _wait_for_finish_dependency_timer =
649
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
2
    if constexpr (!is_fake_shared) {
652
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
2
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
2
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
2
            _shared_state = info.shared_state->template cast<SharedState>();
668
2
            _dependency = _shared_state->create_sink_dependency(
669
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
2
        }
671
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
2
    }
674
675
2
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
2
    _rows_input_counter =
680
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
2
    _memory_used_counter =
686
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
2
    _common_profile->add_info_string("IsColocate",
688
2
                                     std::to_string(_parent->is_colocated_operator()));
689
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
2
    return Status::OK();
693
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
266k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
266k
    _operator_profile =
636
266k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
266k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
266k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
266k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
266k
    _operator_profile->add_child(_common_profile, true);
645
266k
    _operator_profile->add_child(_custom_profile, true);
646
647
266k
    _operator_profile->set_metadata(_parent->node_id());
648
266k
    _wait_for_finish_dependency_timer =
649
266k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
266k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
266k
    if constexpr (!is_fake_shared) {
652
266k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
266k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
266k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
266k
            _shared_state = info.shared_state->template cast<SharedState>();
668
266k
            _dependency = _shared_state->create_sink_dependency(
669
266k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
266k
        }
671
266k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
266k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
266k
    }
674
675
266k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
266k
    _rows_input_counter =
680
266k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
266k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
266k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
266k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
266k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
266k
    _memory_used_counter =
686
266k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
266k
    _common_profile->add_info_string("IsColocate",
688
266k
                                     std::to_string(_parent->is_colocated_operator()));
689
266k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
266k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
266k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
266k
    return Status::OK();
693
266k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
27
    _operator_profile =
636
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
27
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
27
    _operator_profile->add_child(_common_profile, true);
645
27
    _operator_profile->add_child(_custom_profile, true);
646
647
27
    _operator_profile->set_metadata(_parent->node_id());
648
27
    _wait_for_finish_dependency_timer =
649
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
27
    if constexpr (!is_fake_shared) {
652
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
27
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
27
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
27
            _shared_state = info.shared_state->template cast<SharedState>();
668
27
            _dependency = _shared_state->create_sink_dependency(
669
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
27
        }
671
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
27
    }
674
675
27
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
27
    _rows_input_counter =
680
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
27
    _memory_used_counter =
686
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
27
    _common_profile->add_info_string("IsColocate",
688
27
                                     std::to_string(_parent->is_colocated_operator()));
689
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
27
    return Status::OK();
693
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
8.98k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
8.98k
    _operator_profile =
636
8.98k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
8.98k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
8.98k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
8.98k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
8.98k
    _operator_profile->add_child(_common_profile, true);
645
8.98k
    _operator_profile->add_child(_custom_profile, true);
646
647
8.98k
    _operator_profile->set_metadata(_parent->node_id());
648
8.98k
    _wait_for_finish_dependency_timer =
649
8.98k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
8.98k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
8.98k
    if constexpr (!is_fake_shared) {
652
8.98k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
8.98k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
8.98k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
8.98k
            _shared_state = info.shared_state->template cast<SharedState>();
668
8.98k
            _dependency = _shared_state->create_sink_dependency(
669
8.98k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
8.98k
        }
671
8.98k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
8.98k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
8.98k
    }
674
675
8.98k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
8.98k
    _rows_input_counter =
680
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
8.98k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
8.98k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
8.98k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
8.98k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
8.98k
    _memory_used_counter =
686
8.98k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
8.98k
    _common_profile->add_info_string("IsColocate",
688
8.98k
                                     std::to_string(_parent->is_colocated_operator()));
689
8.98k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
8.98k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
8.98k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
8.98k
    return Status::OK();
693
8.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
6.85k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
6.85k
    _operator_profile =
636
6.85k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
6.85k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
6.85k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
6.85k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
6.85k
    _operator_profile->add_child(_common_profile, true);
645
6.85k
    _operator_profile->add_child(_custom_profile, true);
646
647
6.85k
    _operator_profile->set_metadata(_parent->node_id());
648
6.85k
    _wait_for_finish_dependency_timer =
649
6.85k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
6.85k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
6.85k
    if constexpr (!is_fake_shared) {
652
6.85k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
6.85k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
6.85k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
6.85k
            _shared_state = info.shared_state->template cast<SharedState>();
668
6.85k
            _dependency = _shared_state->create_sink_dependency(
669
6.85k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
6.85k
        }
671
6.85k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
6.85k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
6.85k
    }
674
675
6.85k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
6.85k
    _rows_input_counter =
680
6.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
6.85k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
6.85k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
6.85k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
6.85k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
6.85k
    _memory_used_counter =
686
6.85k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
6.85k
    _common_profile->add_info_string("IsColocate",
688
6.85k
                                     std::to_string(_parent->is_colocated_operator()));
689
6.85k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
6.85k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
6.85k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
6.85k
    return Status::OK();
693
6.85k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
136k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
136k
    _operator_profile =
636
136k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
136k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
136k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
136k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
136k
    _operator_profile->add_child(_common_profile, true);
645
136k
    _operator_profile->add_child(_custom_profile, true);
646
647
136k
    _operator_profile->set_metadata(_parent->node_id());
648
136k
    _wait_for_finish_dependency_timer =
649
136k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
136k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
136k
    if constexpr (!is_fake_shared) {
652
136k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
136k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
136k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
136k
            _shared_state = info.shared_state->template cast<SharedState>();
668
136k
            _dependency = _shared_state->create_sink_dependency(
669
136k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
136k
        }
671
136k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
136k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
136k
    }
674
675
136k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
136k
    _rows_input_counter =
680
136k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
136k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
136k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
136k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
136k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
136k
    _memory_used_counter =
686
136k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
136k
    _common_profile->add_info_string("IsColocate",
688
136k
                                     std::to_string(_parent->is_colocated_operator()));
689
136k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
136k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
136k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
136k
    return Status::OK();
693
136k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
22
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
22
    _operator_profile =
636
22
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
22
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
22
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
22
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
22
    _operator_profile->add_child(_common_profile, true);
645
22
    _operator_profile->add_child(_custom_profile, true);
646
647
22
    _operator_profile->set_metadata(_parent->node_id());
648
22
    _wait_for_finish_dependency_timer =
649
22
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
22
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
22
    if constexpr (!is_fake_shared) {
652
22
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
22
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
22
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
22
            _shared_state = info.shared_state->template cast<SharedState>();
668
22
            _dependency = _shared_state->create_sink_dependency(
669
22
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
22
        }
671
22
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
22
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
22
    }
674
675
22
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
22
    _rows_input_counter =
680
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
22
    _memory_used_counter =
686
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
22
    _common_profile->add_info_string("IsColocate",
688
22
                                     std::to_string(_parent->is_colocated_operator()));
689
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
22
    return Status::OK();
693
22
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
676k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
676k
    _operator_profile =
636
676k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
676k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
676k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
676k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
676k
    _operator_profile->add_child(_common_profile, true);
645
676k
    _operator_profile->add_child(_custom_profile, true);
646
647
676k
    _operator_profile->set_metadata(_parent->node_id());
648
676k
    _wait_for_finish_dependency_timer =
649
676k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
676k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
    if constexpr (!is_fake_shared) {
652
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
                                                  ? 0
660
                                                  : info.task_idx]
661
                                  .get();
662
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
            _shared_state = info.shared_state->template cast<SharedState>();
668
            _dependency = _shared_state->create_sink_dependency(
669
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
        }
671
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
    }
674
675
676k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
676k
    _rows_input_counter =
680
676k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
676k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
676k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
676k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
676k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
676k
    _memory_used_counter =
686
676k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
676k
    _common_profile->add_info_string("IsColocate",
688
676k
                                     std::to_string(_parent->is_colocated_operator()));
689
676k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
676k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
676k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
676k
    return Status::OK();
693
676k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
7.36k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
7.36k
    _operator_profile =
636
7.36k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
7.36k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
7.36k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
7.36k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
7.36k
    _operator_profile->add_child(_common_profile, true);
645
7.36k
    _operator_profile->add_child(_custom_profile, true);
646
647
7.36k
    _operator_profile->set_metadata(_parent->node_id());
648
7.36k
    _wait_for_finish_dependency_timer =
649
7.36k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
7.36k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
7.36k
    if constexpr (!is_fake_shared) {
652
7.36k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
7.36k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
7.36k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
7.36k
            _shared_state = info.shared_state->template cast<SharedState>();
668
7.36k
            _dependency = _shared_state->create_sink_dependency(
669
7.36k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
7.36k
        }
671
7.36k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
7.36k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
7.36k
    }
674
675
7.36k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
7.36k
    _rows_input_counter =
680
7.36k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
7.36k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
7.36k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
7.36k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
7.36k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
7.36k
    _memory_used_counter =
686
7.36k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
7.36k
    _common_profile->add_info_string("IsColocate",
688
7.36k
                                     std::to_string(_parent->is_colocated_operator()));
689
7.36k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
7.36k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
7.36k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
7.36k
    return Status::OK();
693
7.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
390
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
390
    _operator_profile =
636
390
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
390
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
390
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
390
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
390
    _operator_profile->add_child(_common_profile, true);
645
390
    _operator_profile->add_child(_custom_profile, true);
646
647
390
    _operator_profile->set_metadata(_parent->node_id());
648
390
    _wait_for_finish_dependency_timer =
649
390
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
390
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
390
    if constexpr (!is_fake_shared) {
652
390
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
390
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
390
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
390
            _shared_state = info.shared_state->template cast<SharedState>();
668
390
            _dependency = _shared_state->create_sink_dependency(
669
390
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
390
        }
671
390
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
390
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
390
    }
674
675
390
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
390
    _rows_input_counter =
680
390
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
390
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
390
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
390
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
390
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
390
    _memory_used_counter =
686
390
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
390
    _common_profile->add_info_string("IsColocate",
688
390
                                     std::to_string(_parent->is_colocated_operator()));
689
390
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
390
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
390
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
390
    return Status::OK();
693
390
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
4.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
4.08k
    _operator_profile =
636
4.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
4.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
4.08k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
4.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
4.08k
    _operator_profile->add_child(_common_profile, true);
645
4.08k
    _operator_profile->add_child(_custom_profile, true);
646
647
4.08k
    _operator_profile->set_metadata(_parent->node_id());
648
4.08k
    _wait_for_finish_dependency_timer =
649
4.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
4.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
4.08k
    if constexpr (!is_fake_shared) {
652
4.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
4.08k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
4.08k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
4.08k
            _shared_state = info.shared_state->template cast<SharedState>();
668
4.08k
            _dependency = _shared_state->create_sink_dependency(
669
4.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
4.08k
        }
671
4.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
4.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
4.08k
    }
674
675
4.08k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
4.08k
    _rows_input_counter =
680
4.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
4.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
4.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
4.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
4.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
4.08k
    _memory_used_counter =
686
4.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
4.08k
    _common_profile->add_info_string("IsColocate",
688
4.08k
                                     std::to_string(_parent->is_colocated_operator()));
689
4.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
4.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
4.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
4.08k
    return Status::OK();
693
4.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
11.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
11.8k
    _operator_profile =
636
11.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
11.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
11.8k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
11.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
11.8k
    _operator_profile->add_child(_common_profile, true);
645
11.8k
    _operator_profile->add_child(_custom_profile, true);
646
647
11.8k
    _operator_profile->set_metadata(_parent->node_id());
648
11.8k
    _wait_for_finish_dependency_timer =
649
11.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
11.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
11.8k
    if constexpr (!is_fake_shared) {
652
11.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
11.8k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
11.8k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
11.8k
            _shared_state = info.shared_state->template cast<SharedState>();
668
11.8k
            _dependency = _shared_state->create_sink_dependency(
669
11.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
11.8k
        }
671
11.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
11.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
11.8k
    }
674
675
11.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
11.8k
    _rows_input_counter =
680
11.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
11.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
11.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
11.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
11.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
11.8k
    _memory_used_counter =
686
11.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
11.8k
    _common_profile->add_info_string("IsColocate",
688
11.8k
                                     std::to_string(_parent->is_colocated_operator()));
689
11.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
11.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
11.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
11.8k
    return Status::OK();
693
11.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
303k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
303k
    _operator_profile =
636
303k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
303k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
303k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
303k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
303k
    _operator_profile->add_child(_common_profile, true);
645
303k
    _operator_profile->add_child(_custom_profile, true);
646
647
303k
    _operator_profile->set_metadata(_parent->node_id());
648
303k
    _wait_for_finish_dependency_timer =
649
303k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
303k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
303k
    if constexpr (!is_fake_shared) {
652
303k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
303k
            info.shared_state_map.end()) {
654
303k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
303k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
303k
            }
657
303k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
303k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
303k
                                                  ? 0
660
303k
                                                  : info.task_idx]
661
303k
                                  .get();
662
303k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
303k
        } else {
664
77
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
77
                DCHECK(false);
666
77
            }
667
77
            _shared_state = info.shared_state->template cast<SharedState>();
668
77
            _dependency = _shared_state->create_sink_dependency(
669
77
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
77
        }
671
303k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
303k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
303k
    }
674
675
303k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
303k
    _rows_input_counter =
680
303k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
303k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
303k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
303k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
303k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
303k
    _memory_used_counter =
686
303k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
303k
    _common_profile->add_info_string("IsColocate",
688
303k
                                     std::to_string(_parent->is_colocated_operator()));
689
303k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
303k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
303k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
303k
    return Status::OK();
693
303k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
505k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
505k
    _operator_profile =
636
505k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
505k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
505k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
505k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
505k
    _operator_profile->add_child(_common_profile, true);
645
505k
    _operator_profile->add_child(_custom_profile, true);
646
647
505k
    _operator_profile->set_metadata(_parent->node_id());
648
505k
    _wait_for_finish_dependency_timer =
649
505k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
505k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
505k
    if constexpr (!is_fake_shared) {
652
505k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
505k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
1.51k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
1.51k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
1.51k
                                                  ? 0
660
1.51k
                                                  : info.task_idx]
661
1.51k
                                  .get();
662
1.51k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
503k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
503k
            _shared_state = info.shared_state->template cast<SharedState>();
668
503k
            _dependency = _shared_state->create_sink_dependency(
669
503k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
503k
        }
671
505k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
505k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
505k
    }
674
675
505k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
505k
    _rows_input_counter =
680
505k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
505k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
505k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
505k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
505k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
505k
    _memory_used_counter =
686
505k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
505k
    _common_profile->add_info_string("IsColocate",
688
505k
                                     std::to_string(_parent->is_colocated_operator()));
689
505k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
505k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
505k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
505k
    return Status::OK();
693
505k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
17
    _operator_profile =
636
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
17
    _operator_profile->add_child(_common_profile, true);
645
17
    _operator_profile->add_child(_custom_profile, true);
646
647
17
    _operator_profile->set_metadata(_parent->node_id());
648
17
    _wait_for_finish_dependency_timer =
649
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
17
    if constexpr (!is_fake_shared) {
652
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
17
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
17
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
17
            _shared_state = info.shared_state->template cast<SharedState>();
668
17
            _dependency = _shared_state->create_sink_dependency(
669
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
17
        }
671
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
17
    }
674
675
17
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
17
    _rows_input_counter =
680
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
17
    _memory_used_counter =
686
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
17
    _common_profile->add_info_string("IsColocate",
688
17
                                     std::to_string(_parent->is_colocated_operator()));
689
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
17
    return Status::OK();
693
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
302
    _operator_profile =
636
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
302
    _operator_profile->add_child(_common_profile, true);
645
302
    _operator_profile->add_child(_custom_profile, true);
646
647
302
    _operator_profile->set_metadata(_parent->node_id());
648
302
    _wait_for_finish_dependency_timer =
649
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
302
    if constexpr (!is_fake_shared) {
652
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
302
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
302
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
302
            _shared_state = info.shared_state->template cast<SharedState>();
668
302
            _dependency = _shared_state->create_sink_dependency(
669
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
302
        }
671
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
302
    }
674
675
302
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
302
    _rows_input_counter =
680
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
302
    _memory_used_counter =
686
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
302
    _common_profile->add_info_string("IsColocate",
688
302
                                     std::to_string(_parent->is_colocated_operator()));
689
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
302
    return Status::OK();
693
302
}
694
695
template <typename SharedState>
696
2.07M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
2.07M
    if (_closed) {
698
2
        return Status::OK();
699
2
    }
700
2.07M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
1.39M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
1.39M
    }
703
2.07M
    _closed = true;
704
2.07M
    return Status::OK();
705
2.07M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
145k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
145k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
145k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
145k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
145k
    }
703
145k
    _closed = true;
704
145k
    return Status::OK();
705
145k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
1
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
1
    }
703
1
    _closed = true;
704
1
    return Status::OK();
705
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
265k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
265k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
265k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
265k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
265k
    }
703
265k
    _closed = true;
704
265k
    return Status::OK();
705
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
19
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
19
    if (_closed) {
698
2
        return Status::OK();
699
2
    }
700
17
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
17
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
17
    }
703
17
    _closed = true;
704
17
    return Status::OK();
705
19
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
8.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
8.96k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
8.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
8.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
8.96k
    }
703
8.96k
    _closed = true;
704
8.96k
    return Status::OK();
705
8.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
6.83k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
6.83k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
6.83k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
6.83k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
6.83k
    }
703
6.83k
    _closed = true;
704
6.83k
    return Status::OK();
705
6.83k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
136k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
136k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
136k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
136k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
136k
    }
703
136k
    _closed = true;
704
136k
    return Status::OK();
705
136k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
11
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
11
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
11
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
11
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
11
    }
703
11
    _closed = true;
704
11
    return Status::OK();
705
11
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
677k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
677k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
    }
703
677k
    _closed = true;
704
677k
    return Status::OK();
705
677k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
7.35k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
7.35k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
7.35k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
7.35k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
7.35k
    }
703
7.35k
    _closed = true;
704
7.35k
    return Status::OK();
705
7.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
289
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
289
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
289
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
289
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
289
    }
703
289
    _closed = true;
704
289
    return Status::OK();
705
289
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
4.07k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
4.07k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
4.07k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
4.07k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
4.07k
    }
703
4.07k
    _closed = true;
704
4.07k
    return Status::OK();
705
4.07k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
11.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
11.7k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
11.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
11.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
11.7k
    }
703
11.7k
    _closed = true;
704
11.7k
    return Status::OK();
705
11.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
304k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
304k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
304k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
304k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
304k
    }
703
304k
    _closed = true;
704
304k
    return Status::OK();
705
304k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
507k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
507k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
507k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
507k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
507k
    }
703
507k
    _closed = true;
704
507k
    return Status::OK();
705
507k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
14
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
14
    }
703
14
    _closed = true;
704
14
    return Status::OK();
705
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
302
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
302
    }
703
302
    _closed = true;
704
302
    return Status::OK();
705
302
}
706
707
template <typename LocalStateType>
708
7.52k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
709
7.52k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
710
7.52k
    return pull(state, block, eos);
711
7.52k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
708
431
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
709
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
710
431
    return pull(state, block, eos);
711
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
708
7.09k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
709
7.09k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
710
7.09k
    return pull(state, block, eos);
711
7.09k
}
712
713
template <typename LocalStateType>
714
752k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
752k
    auto& local_state = get_local_state(state);
716
752k
    if (need_more_input_data(state)) {
717
705k
        local_state._child_block->clear_column_data(
718
705k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
705k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
705k
                state, local_state._child_block.get(), &local_state._child_eos));
721
705k
        *eos = local_state._child_eos;
722
705k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
50.2k
            return Status::OK();
724
50.2k
        }
725
654k
        {
726
654k
            SCOPED_TIMER(local_state.exec_time_counter());
727
654k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
654k
        }
729
654k
    }
730
731
702k
    if (!need_more_input_data(state)) {
732
659k
        SCOPED_TIMER(local_state.exec_time_counter());
733
659k
        bool new_eos = false;
734
659k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
659k
        if (new_eos) {
736
578k
            *eos = true;
737
578k
        } else if (!need_more_input_data(state)) {
738
24.2k
            *eos = false;
739
24.2k
        }
740
659k
    }
741
702k
    return Status::OK();
742
702k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
151k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
151k
    auto& local_state = get_local_state(state);
716
151k
    if (need_more_input_data(state)) {
717
117k
        local_state._child_block->clear_column_data(
718
117k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
117k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
117k
                state, local_state._child_block.get(), &local_state._child_eos));
721
117k
        *eos = local_state._child_eos;
722
117k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
23.7k
            return Status::OK();
724
23.7k
        }
725
93.8k
        {
726
93.8k
            SCOPED_TIMER(local_state.exec_time_counter());
727
93.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
93.8k
        }
729
93.8k
    }
730
731
128k
    if (!need_more_input_data(state)) {
732
128k
        SCOPED_TIMER(local_state.exec_time_counter());
733
128k
        bool new_eos = false;
734
128k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
128k
        if (new_eos) {
736
73.3k
            *eos = true;
737
73.3k
        } else if (!need_more_input_data(state)) {
738
9.57k
            *eos = false;
739
9.57k
        }
740
128k
    }
741
128k
    return Status::OK();
742
128k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
3.27k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
3.27k
    auto& local_state = get_local_state(state);
716
3.27k
    if (need_more_input_data(state)) {
717
1.98k
        local_state._child_block->clear_column_data(
718
1.98k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
1.98k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
1.98k
                state, local_state._child_block.get(), &local_state._child_eos));
721
1.98k
        *eos = local_state._child_eos;
722
1.98k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
760
            return Status::OK();
724
760
        }
725
1.22k
        {
726
1.22k
            SCOPED_TIMER(local_state.exec_time_counter());
727
1.22k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
1.22k
        }
729
1.22k
    }
730
731
2.51k
    if (!need_more_input_data(state)) {
732
2.51k
        SCOPED_TIMER(local_state.exec_time_counter());
733
2.51k
        bool new_eos = false;
734
2.51k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
2.51k
        if (new_eos) {
736
795
            *eos = true;
737
1.72k
        } else if (!need_more_input_data(state)) {
738
1.28k
            *eos = false;
739
1.28k
        }
740
2.51k
    }
741
2.51k
    return Status::OK();
742
2.51k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
4.46k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
4.46k
    auto& local_state = get_local_state(state);
716
4.46k
    if (need_more_input_data(state)) {
717
4.46k
        local_state._child_block->clear_column_data(
718
4.46k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
4.46k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
4.46k
                state, local_state._child_block.get(), &local_state._child_eos));
721
4.46k
        *eos = local_state._child_eos;
722
4.46k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
1.56k
            return Status::OK();
724
1.56k
        }
725
2.89k
        {
726
2.89k
            SCOPED_TIMER(local_state.exec_time_counter());
727
2.89k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
2.89k
        }
729
2.89k
    }
730
731
2.89k
    if (!need_more_input_data(state)) {
732
2.89k
        SCOPED_TIMER(local_state.exec_time_counter());
733
2.89k
        bool new_eos = false;
734
2.89k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
2.89k
        if (new_eos) {
736
1.60k
            *eos = true;
737
1.60k
        } else if (!need_more_input_data(state)) {
738
0
            *eos = false;
739
0
        }
740
2.89k
    }
741
2.89k
    return Status::OK();
742
2.89k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
31.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
31.7k
    auto& local_state = get_local_state(state);
716
31.7k
    if (need_more_input_data(state)) {
717
31.7k
        local_state._child_block->clear_column_data(
718
31.7k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
31.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
31.7k
                state, local_state._child_block.get(), &local_state._child_eos));
721
31.7k
        *eos = local_state._child_eos;
722
31.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
8.10k
            return Status::OK();
724
8.10k
        }
725
23.6k
        {
726
23.6k
            SCOPED_TIMER(local_state.exec_time_counter());
727
23.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
23.6k
        }
729
23.6k
    }
730
731
23.6k
    if (!need_more_input_data(state)) {
732
12.3k
        SCOPED_TIMER(local_state.exec_time_counter());
733
12.3k
        bool new_eos = false;
734
12.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
12.3k
        if (new_eos) {
736
12.2k
            *eos = true;
737
12.2k
        } else if (!need_more_input_data(state)) {
738
12
            *eos = false;
739
12
        }
740
12.3k
    }
741
23.6k
    return Status::OK();
742
23.6k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
523k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
523k
    auto& local_state = get_local_state(state);
716
524k
    if (need_more_input_data(state)) {
717
524k
        local_state._child_block->clear_column_data(
718
524k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
524k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
524k
                state, local_state._child_block.get(), &local_state._child_eos));
721
524k
        *eos = local_state._child_eos;
722
524k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
12.7k
            return Status::OK();
724
12.7k
        }
725
511k
        {
726
511k
            SCOPED_TIMER(local_state.exec_time_counter());
727
511k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
511k
        }
729
511k
    }
730
731
510k
    if (!need_more_input_data(state)) {
732
479k
        SCOPED_TIMER(local_state.exec_time_counter());
733
479k
        bool new_eos = false;
734
479k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
479k
        if (new_eos) {
736
478k
            *eos = true;
737
478k
        } else if (!need_more_input_data(state)) {
738
0
            *eos = false;
739
0
        }
740
479k
    }
741
510k
    return Status::OK();
742
510k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
32.3k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
32.3k
    auto& local_state = get_local_state(state);
716
32.3k
    if (need_more_input_data(state)) {
717
19.2k
        local_state._child_block->clear_column_data(
718
19.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
19.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
19.2k
                state, local_state._child_block.get(), &local_state._child_eos));
721
19.2k
        *eos = local_state._child_eos;
722
19.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
2.72k
            return Status::OK();
724
2.72k
        }
725
16.5k
        {
726
16.5k
            SCOPED_TIMER(local_state.exec_time_counter());
727
16.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
16.5k
        }
729
16.5k
    }
730
731
29.5k
    if (!need_more_input_data(state)) {
732
28.8k
        SCOPED_TIMER(local_state.exec_time_counter());
733
28.8k
        bool new_eos = false;
734
28.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
28.8k
        if (new_eos) {
736
8.96k
            *eos = true;
737
19.8k
        } else if (!need_more_input_data(state)) {
738
13.0k
            *eos = false;
739
13.0k
        }
740
28.8k
    }
741
29.5k
    return Status::OK();
742
29.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
6.26k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
6.26k
    auto& local_state = get_local_state(state);
716
6.26k
    if (need_more_input_data(state)) {
717
5.89k
        local_state._child_block->clear_column_data(
718
5.89k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
5.89k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
5.89k
                state, local_state._child_block.get(), &local_state._child_eos));
721
5.89k
        *eos = local_state._child_eos;
722
5.89k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
582
            return Status::OK();
724
582
        }
725
5.31k
        {
726
5.31k
            SCOPED_TIMER(local_state.exec_time_counter());
727
5.31k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
5.31k
        }
729
5.31k
    }
730
731
5.67k
    if (!need_more_input_data(state)) {
732
5.66k
        SCOPED_TIMER(local_state.exec_time_counter());
733
5.66k
        bool new_eos = false;
734
5.66k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
5.66k
        if (new_eos) {
736
3.67k
            *eos = true;
737
3.67k
        } else if (!need_more_input_data(state)) {
738
366
            *eos = false;
739
366
        }
740
5.66k
    }
741
5.67k
    return Status::OK();
742
5.67k
}
743
744
template <typename Writer, typename Parent>
745
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
746
67.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
67.6k
    RETURN_IF_ERROR(Base::init(state, info));
748
67.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
67.6k
                                                         "AsyncWriterDependency", true);
750
67.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
67.6k
                             _finish_dependency));
752
753
67.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
67.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
67.6k
    return Status::OK();
756
67.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
524
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
524
    RETURN_IF_ERROR(Base::init(state, info));
748
524
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
524
                                                         "AsyncWriterDependency", true);
750
524
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
524
                             _finish_dependency));
752
753
524
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
524
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
524
    return Status::OK();
756
524
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
80
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
80
    RETURN_IF_ERROR(Base::init(state, info));
748
80
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
80
                                                         "AsyncWriterDependency", true);
750
80
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
80
                             _finish_dependency));
752
753
80
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
80
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
80
    return Status::OK();
756
80
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
52.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
52.1k
    RETURN_IF_ERROR(Base::init(state, info));
748
52.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
52.1k
                                                         "AsyncWriterDependency", true);
750
52.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
52.1k
                             _finish_dependency));
752
753
52.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
52.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
52.1k
    return Status::OK();
756
52.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
5.46k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
5.46k
    RETURN_IF_ERROR(Base::init(state, info));
748
5.46k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
5.46k
                                                         "AsyncWriterDependency", true);
750
5.46k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
5.46k
                             _finish_dependency));
752
753
5.46k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
5.46k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
5.46k
    return Status::OK();
756
5.46k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
5.14k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
5.14k
    RETURN_IF_ERROR(Base::init(state, info));
748
5.14k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
5.14k
                                                         "AsyncWriterDependency", true);
750
5.14k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
5.14k
                             _finish_dependency));
752
753
5.14k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
5.14k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
5.14k
    return Status::OK();
756
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
748
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
3.38k
                                                         "AsyncWriterDependency", true);
750
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
3.38k
                             _finish_dependency));
752
753
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
3.38k
    return Status::OK();
756
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
160
    RETURN_IF_ERROR(Base::init(state, info));
748
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
160
                                                         "AsyncWriterDependency", true);
750
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
160
                             _finish_dependency));
752
753
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
160
    return Status::OK();
756
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
640
    RETURN_IF_ERROR(Base::init(state, info));
748
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
640
                                                         "AsyncWriterDependency", true);
750
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
640
                             _finish_dependency));
752
753
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
640
    return Status::OK();
756
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
156
    RETURN_IF_ERROR(Base::init(state, info));
748
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
156
                                                         "AsyncWriterDependency", true);
750
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
156
                             _finish_dependency));
752
753
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
156
    return Status::OK();
756
156
}
757
758
template <typename Writer, typename Parent>
759
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
760
67.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
67.9k
    RETURN_IF_ERROR(Base::open(state));
762
67.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
603k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
535k
        RETURN_IF_ERROR(
765
535k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
535k
    }
767
67.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
67.9k
    return Status::OK();
769
67.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
524
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
524
    RETURN_IF_ERROR(Base::open(state));
762
524
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
2.79k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
2.27k
        RETURN_IF_ERROR(
765
2.27k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
2.27k
    }
767
524
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
524
    return Status::OK();
769
524
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
80
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
80
    RETURN_IF_ERROR(Base::open(state));
762
80
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
388
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
308
        RETURN_IF_ERROR(
765
308
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
308
    }
767
80
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
80
    return Status::OK();
769
80
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
52.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
52.4k
    RETURN_IF_ERROR(Base::open(state));
762
52.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
380k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
328k
        RETURN_IF_ERROR(
765
328k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
328k
    }
767
52.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
52.4k
    return Status::OK();
769
52.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
5.43k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
5.43k
    RETURN_IF_ERROR(Base::open(state));
762
5.43k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
38.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
32.7k
        RETURN_IF_ERROR(
765
32.7k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
32.7k
    }
767
5.43k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
5.43k
    return Status::OK();
769
5.43k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
5.14k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
5.14k
    RETURN_IF_ERROR(Base::open(state));
762
5.14k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
133k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
128k
        RETURN_IF_ERROR(
765
128k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
128k
    }
767
5.14k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
5.14k
    return Status::OK();
769
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
3.38k
    RETURN_IF_ERROR(Base::open(state));
762
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
42.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
39.0k
        RETURN_IF_ERROR(
765
39.0k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
39.0k
    }
767
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
3.38k
    return Status::OK();
769
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
160
    RETURN_IF_ERROR(Base::open(state));
762
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
480
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
320
        RETURN_IF_ERROR(
765
320
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
320
    }
767
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
160
    return Status::OK();
769
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
638
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
638
    RETURN_IF_ERROR(Base::open(state));
762
638
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
4.37k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
3.73k
        RETURN_IF_ERROR(
765
3.73k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
3.73k
    }
767
638
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
638
    return Status::OK();
769
638
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
156
    RETURN_IF_ERROR(Base::open(state));
762
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
630
        RETURN_IF_ERROR(
765
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
630
    }
767
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
156
    return Status::OK();
769
156
}
770
771
template <typename Writer, typename Parent>
772
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
773
88.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
88.0k
    return _writer->sink(block, eos);
775
88.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
2.56k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
2.56k
    return _writer->sink(block, eos);
775
2.56k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
104
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
104
    return _writer->sink(block, eos);
775
104
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
64.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
64.8k
    return _writer->sink(block, eos);
775
64.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
6.46k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
6.46k
    return _writer->sink(block, eos);
775
6.46k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
7.49k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
7.49k
    return _writer->sink(block, eos);
775
7.49k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
5.33k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
5.33k
    return _writer->sink(block, eos);
775
5.33k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
180
    return _writer->sink(block, eos);
775
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
784
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
784
    return _writer->sink(block, eos);
775
784
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
306
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
306
    return _writer->sink(block, eos);
775
306
}
776
777
template <typename Writer, typename Parent>
778
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
779
68.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
68.0k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
68.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
68.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
68.0k
    if (_writer) {
787
68.0k
        Status st = _writer->get_writer_status();
788
68.0k
        if (exec_status.ok()) {
789
67.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
67.9k
                                                       : Status::Cancelled("force close"));
791
67.9k
        } else {
792
77
            _writer->force_close(exec_status);
793
77
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
68.0k
        RETURN_IF_ERROR(st);
798
68.0k
    }
799
67.9k
    return Base::close(state, exec_status);
800
68.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
512
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
512
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
512
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
512
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
512
    if (_writer) {
787
512
        Status st = _writer->get_writer_status();
788
512
        if (exec_status.ok()) {
789
512
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
512
                                                       : Status::Cancelled("force close"));
791
512
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
512
        RETURN_IF_ERROR(st);
798
512
    }
799
512
    return Base::close(state, exec_status);
800
512
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
80
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
80
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
80
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
80
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
80
    if (_writer) {
787
80
        Status st = _writer->get_writer_status();
788
80
        if (exec_status.ok()) {
789
80
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
80
                                                       : Status::Cancelled("force close"));
791
80
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
80
        RETURN_IF_ERROR(st);
798
80
    }
799
80
    return Base::close(state, exec_status);
800
80
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
52.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
52.5k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
52.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
52.5k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
52.5k
    if (_writer) {
787
52.5k
        Status st = _writer->get_writer_status();
788
52.5k
        if (exec_status.ok()) {
789
52.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
52.4k
                                                       : Status::Cancelled("force close"));
791
52.4k
        } else {
792
63
            _writer->force_close(exec_status);
793
63
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
52.5k
        RETURN_IF_ERROR(st);
798
52.5k
    }
799
52.4k
    return Base::close(state, exec_status);
800
52.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
5.46k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
5.46k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
5.46k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
5.46k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
5.46k
    if (_writer) {
787
5.46k
        Status st = _writer->get_writer_status();
788
5.46k
        if (exec_status.ok()) {
789
5.44k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
5.44k
                                                       : Status::Cancelled("force close"));
791
5.44k
        } else {
792
14
            _writer->force_close(exec_status);
793
14
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
5.46k
        RETURN_IF_ERROR(st);
798
5.46k
    }
799
5.46k
    return Base::close(state, exec_status);
800
5.46k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
5.14k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
5.14k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
5.14k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
5.14k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
5.14k
    if (_writer) {
787
5.14k
        Status st = _writer->get_writer_status();
788
5.14k
        if (exec_status.ok()) {
789
5.14k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
5.14k
                                                       : Status::Cancelled("force close"));
791
5.14k
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
5.14k
        RETURN_IF_ERROR(st);
798
5.14k
    }
799
5.14k
    return Base::close(state, exec_status);
800
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
3.38k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
3.38k
    if (_writer) {
787
3.38k
        Status st = _writer->get_writer_status();
788
3.38k
        if (exec_status.ok()) {
789
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
3.38k
                                                       : Status::Cancelled("force close"));
791
3.38k
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
3.38k
        RETURN_IF_ERROR(st);
798
3.38k
    }
799
3.38k
    return Base::close(state, exec_status);
800
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
160
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
160
    if (_writer) {
787
160
        Status st = _writer->get_writer_status();
788
160
        if (exec_status.ok()) {
789
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
160
                                                       : Status::Cancelled("force close"));
791
160
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
160
        RETURN_IF_ERROR(st);
798
160
    }
799
160
    return Base::close(state, exec_status);
800
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
640
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
640
    if (_writer) {
787
640
        Status st = _writer->get_writer_status();
788
640
        if (exec_status.ok()) {
789
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
640
                                                       : Status::Cancelled("force close"));
791
640
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
640
        RETURN_IF_ERROR(st);
798
640
    }
799
640
    return Base::close(state, exec_status);
800
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
156
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
156
    if (_writer) {
787
156
        Status st = _writer->get_writer_status();
788
156
        if (exec_status.ok()) {
789
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
156
                                                       : Status::Cancelled("force close"));
791
156
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
156
        RETURN_IF_ERROR(st);
798
156
    }
799
156
    return Base::close(state, exec_status);
800
156
}
801
802
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
803
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
804
DECLARE_OPERATOR(ResultSinkLocalState)
805
DECLARE_OPERATOR(JdbcTableSinkLocalState)
806
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
807
DECLARE_OPERATOR(ResultFileSinkLocalState)
808
DECLARE_OPERATOR(OlapTableSinkLocalState)
809
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
810
DECLARE_OPERATOR(HiveTableSinkLocalState)
811
DECLARE_OPERATOR(TVFTableSinkLocalState)
812
DECLARE_OPERATOR(IcebergTableSinkLocalState)
813
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
814
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
815
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
816
DECLARE_OPERATOR(MCTableSinkLocalState)
817
DECLARE_OPERATOR(AnalyticSinkLocalState)
818
DECLARE_OPERATOR(BlackholeSinkLocalState)
819
DECLARE_OPERATOR(SortSinkLocalState)
820
DECLARE_OPERATOR(SpillSortSinkLocalState)
821
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
822
DECLARE_OPERATOR(AggSinkLocalState)
823
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
824
DECLARE_OPERATOR(ExchangeSinkLocalState)
825
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
826
DECLARE_OPERATOR(UnionSinkLocalState)
827
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
828
DECLARE_OPERATOR(PartitionSortSinkLocalState)
829
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
830
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
831
DECLARE_OPERATOR(SetSinkLocalState<true>)
832
DECLARE_OPERATOR(SetSinkLocalState<false>)
833
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
834
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
835
DECLARE_OPERATOR(CacheSinkLocalState)
836
DECLARE_OPERATOR(DictSinkLocalState)
837
DECLARE_OPERATOR(RecCTESinkLocalState)
838
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
839
840
#undef DECLARE_OPERATOR
841
842
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
843
DECLARE_OPERATOR(HashJoinProbeLocalState)
844
DECLARE_OPERATOR(OlapScanLocalState)
845
DECLARE_OPERATOR(GroupCommitLocalState)
846
DECLARE_OPERATOR(JDBCScanLocalState)
847
DECLARE_OPERATOR(FileScanLocalState)
848
DECLARE_OPERATOR(EsScanLocalState)
849
DECLARE_OPERATOR(AnalyticLocalState)
850
DECLARE_OPERATOR(SortLocalState)
851
DECLARE_OPERATOR(SpillSortLocalState)
852
DECLARE_OPERATOR(LocalMergeSortLocalState)
853
DECLARE_OPERATOR(AggLocalState)
854
DECLARE_OPERATOR(PartitionedAggLocalState)
855
DECLARE_OPERATOR(TableFunctionLocalState)
856
DECLARE_OPERATOR(ExchangeLocalState)
857
DECLARE_OPERATOR(RepeatLocalState)
858
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
859
DECLARE_OPERATOR(AssertNumRowsLocalState)
860
DECLARE_OPERATOR(EmptySetLocalState)
861
DECLARE_OPERATOR(UnionSourceLocalState)
862
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
863
DECLARE_OPERATOR(PartitionSortSourceLocalState)
864
DECLARE_OPERATOR(SetSourceLocalState<true>)
865
DECLARE_OPERATOR(SetSourceLocalState<false>)
866
DECLARE_OPERATOR(DataGenLocalState)
867
DECLARE_OPERATOR(SchemaScanLocalState)
868
DECLARE_OPERATOR(MetaScanLocalState)
869
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
870
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
871
DECLARE_OPERATOR(CacheSourceLocalState)
872
DECLARE_OPERATOR(RecCTESourceLocalState)
873
DECLARE_OPERATOR(RecCTEScanLocalState)
874
875
#ifdef BE_TEST
876
DECLARE_OPERATOR(MockLocalState)
877
DECLARE_OPERATOR(MockScanLocalState)
878
#endif
879
#undef DECLARE_OPERATOR
880
881
template class StreamingOperatorX<AssertNumRowsLocalState>;
882
template class StreamingOperatorX<SelectLocalState>;
883
884
template class StatefulOperatorX<HashJoinProbeLocalState>;
885
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
886
template class StatefulOperatorX<RepeatLocalState>;
887
template class StatefulOperatorX<MaterializationLocalState>;
888
template class StatefulOperatorX<StreamingAggLocalState>;
889
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
890
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
891
template class StatefulOperatorX<TableFunctionLocalState>;
892
893
template class PipelineXSinkLocalState<HashJoinSharedState>;
894
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
895
template class PipelineXSinkLocalState<SortSharedState>;
896
template class PipelineXSinkLocalState<SpillSortSharedState>;
897
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
898
template class PipelineXSinkLocalState<AnalyticSharedState>;
899
template class PipelineXSinkLocalState<AggSharedState>;
900
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
901
template class PipelineXSinkLocalState<FakeSharedState>;
902
template class PipelineXSinkLocalState<UnionSharedState>;
903
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
904
template class PipelineXSinkLocalState<MultiCastSharedState>;
905
template class PipelineXSinkLocalState<SetSharedState>;
906
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
907
template class PipelineXSinkLocalState<BasicSharedState>;
908
template class PipelineXSinkLocalState<DataQueueSharedState>;
909
template class PipelineXSinkLocalState<RecCTESharedState>;
910
911
template class PipelineXLocalState<HashJoinSharedState>;
912
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
913
template class PipelineXLocalState<SortSharedState>;
914
template class PipelineXLocalState<SpillSortSharedState>;
915
template class PipelineXLocalState<NestedLoopJoinSharedState>;
916
template class PipelineXLocalState<AnalyticSharedState>;
917
template class PipelineXLocalState<AggSharedState>;
918
template class PipelineXLocalState<PartitionedAggSharedState>;
919
template class PipelineXLocalState<FakeSharedState>;
920
template class PipelineXLocalState<UnionSharedState>;
921
template class PipelineXLocalState<DataQueueSharedState>;
922
template class PipelineXLocalState<MultiCastSharedState>;
923
template class PipelineXLocalState<PartitionSortNodeSharedState>;
924
template class PipelineXLocalState<SetSharedState>;
925
template class PipelineXLocalState<LocalExchangeSharedState>;
926
template class PipelineXLocalState<BasicSharedState>;
927
template class PipelineXLocalState<RecCTESharedState>;
928
929
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
930
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
931
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
932
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
933
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
934
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
936
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
937
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
938
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
939
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
940
941
#ifdef BE_TEST
942
template class OperatorX<DummyOperatorLocalState>;
943
template class DataSinkOperatorX<DummySinkLocalState>;
944
#endif
945
946
#include "common/compile_check_end.h"
947
} // namespace doris