Coverage Report

Created: 2026-05-20 07:37

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