Coverage Report

Created: 2026-05-19 10:32

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.17M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.17M
    if (_parent->nereids_id() == -1) {
120
1.13M
        return fmt::format("(id={})", _parent->node_id());
121
1.13M
    } else {
122
1.04M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.04M
    }
124
2.17M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
70.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
70.7k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
70.7k
    } else {
122
70.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
70.7k
    }
124
70.7k
}
_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
253k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
253k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
253k
    } else {
122
253k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
253k
    }
124
253k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
25
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
25
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
25
    } else {
122
25
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
25
    }
124
25
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
12.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
12.0k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
12.0k
    } else {
122
12.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
12.0k
    }
124
12.0k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.85k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.85k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
6.84k
    } else {
122
6.84k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.84k
    }
124
6.85k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
151k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
151k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
151k
    } else {
122
151k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
151k
    }
124
151k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
387
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
387
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
387
    } else {
122
387
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
387
    }
124
387
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
220
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
220
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
220
    } else {
122
220
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
220
    }
124
220
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
879k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
879k
    if (_parent->nereids_id() == -1) {
120
393k
        return fmt::format("(id={})", _parent->node_id());
121
485k
    } else {
122
485k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
485k
    }
124
879k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.7k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.7k
    } else {
122
54.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.7k
    }
124
54.7k
}
_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
15.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
15.6k
    if (_parent->nereids_id() == -1) {
120
15.6k
        return fmt::format("(id={})", _parent->node_id());
121
15.6k
    } else {
122
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
3
    }
124
15.6k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
391
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
391
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
289
    } else {
122
289
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
289
    }
124
391
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.93k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.93k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
4.92k
    } else {
122
4.92k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.92k
    }
124
4.93k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
724k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
724k
    if (_parent->nereids_id() == -1) {
120
723k
        return fmt::format("(id={})", _parent->node_id());
121
723k
    } else {
122
584
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
584
    }
124
724k
}
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.32M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.32M
    if (_parent->nereids_id() == -1) {
129
773k
        return fmt::format("(id={})", _parent->node_id());
130
773k
    } else {
131
551k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
551k
    }
133
1.32M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
118k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
118k
    } else {
131
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
118k
    }
133
118k
}
_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
254k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
254k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
254k
    } else {
131
254k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
254k
    }
133
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
31
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
31
    } else {
131
31
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
31
    }
133
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.0k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
12.0k
    } else {
131
12.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
12.0k
    }
133
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.87k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.87k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
6.86k
    } else {
131
6.86k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.86k
    }
133
6.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
151k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
151k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
151k
    } else {
131
151k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
151k
    }
133
151k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
295
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
295
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
295
    } else {
131
295
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
295
    }
133
295
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
230
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
230
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
230
    } else {
131
230
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
230
    }
133
230
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
131
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
131
    if (_parent->nereids_id() == -1) {
129
131
        return fmt::format("(id={})", _parent->node_id());
130
131
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
131
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.80k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.80k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.80k
    } else {
131
5.80k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.80k
    }
133
5.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
393
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
393
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
291
    } else {
131
291
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
291
    }
133
393
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.1k
    if (_parent->nereids_id() == -1) {
129
12.1k
        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
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
268k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
268k
    if (_parent->nereids_id() == -1) {
129
268k
        return fmt::format("(id={})", _parent->node_id());
130
268k
    } else {
131
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
30
    }
133
268k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
492k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
492k
    if (_parent->nereids_id() == -1) {
129
492k
        return fmt::format("(id={})", _parent->node_id());
130
492k
    } else {
131
287
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
287
    }
133
492k
}
_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.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
33.9k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
33.9k
    _terminated = true;
141
33.9k
    return Status::OK();
142
33.9k
}
_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
1.39k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.39k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.39k
    _terminated = true;
141
1.39k
    return Status::OK();
142
1.39k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
8
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
8
    _terminated = true;
141
8
    return Status::OK();
142
8
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3
    _terminated = true;
141
3
    return Status::OK();
142
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
6.62k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
6.62k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
6.62k
    _terminated = true;
141
6.62k
    return Status::OK();
142
6.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
15
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
15
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
15
    _terminated = true;
141
15
    return Status::OK();
142
15
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.04k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.04k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
1.04k
    _terminated = true;
141
1.04k
    return Status::OK();
142
1.04k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
12
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
12
    _terminated = true;
141
12
    return Status::OK();
142
12
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
389
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
389
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
389
    _terminated = true;
141
389
    return Status::OK();
142
389
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
6
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
6
    _terminated = true;
141
6
    return Status::OK();
142
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
245
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
245
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
245
    _terminated = true;
141
245
    return Status::OK();
142
245
}
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
883k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
883k
    return _child && _child->is_serial_operator() && !is_source()
146
883k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
883k
                   : DataDistribution(ExchangeType::NOOP);
148
883k
}
149
150
81.8k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.8k
    return _child->row_desc();
152
81.8k
}
153
154
template <typename SharedStateArg>
155
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.4k
    fmt::memory_buffer debug_string_buffer;
157
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.4k
    return fmt::to_string(debug_string_buffer);
159
20.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
30
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
30
    fmt::memory_buffer debug_string_buffer;
157
30
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
30
    return fmt::to_string(debug_string_buffer);
159
30
}
_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
9
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
9
    fmt::memory_buffer debug_string_buffer;
157
9
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
9
    return fmt::to_string(debug_string_buffer);
159
9
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
9
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
9
    fmt::memory_buffer debug_string_buffer;
157
9
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
9
    return fmt::to_string(debug_string_buffer);
159
9
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
18
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
18
    fmt::memory_buffer debug_string_buffer;
157
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
18
    return fmt::to_string(debug_string_buffer);
159
18
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
19.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
19.4k
    fmt::memory_buffer debug_string_buffer;
157
19.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
19.4k
    return fmt::to_string(debug_string_buffer);
159
19.4k
}
_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
876
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
876
    fmt::memory_buffer debug_string_buffer;
157
876
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
876
    return fmt::to_string(debug_string_buffer);
159
876
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
20.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.3k
    fmt::memory_buffer debug_string_buffer;
164
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.3k
    return fmt::to_string(debug_string_buffer);
166
20.3k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
6
    fmt::memory_buffer debug_string_buffer;
164
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
6
    return fmt::to_string(debug_string_buffer);
166
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
9
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
9
    fmt::memory_buffer debug_string_buffer;
164
9
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
9
    return fmt::to_string(debug_string_buffer);
166
9
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
6
    fmt::memory_buffer debug_string_buffer;
164
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
6
    return fmt::to_string(debug_string_buffer);
166
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
18
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
18
    fmt::memory_buffer debug_string_buffer;
164
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
18
    return fmt::to_string(debug_string_buffer);
166
18
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
852
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
852
    fmt::memory_buffer debug_string_buffer;
164
852
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
852
    return fmt::to_string(debug_string_buffer);
166
852
}
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
35
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
35
    fmt::memory_buffer debug_string_buffer;
164
35
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
35
    return fmt::to_string(debug_string_buffer);
166
35
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
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
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
20.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
20.8k
    fmt::memory_buffer debug_string_buffer;
170
20.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
20.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
20.8k
                   _is_serial_operator);
173
20.8k
    return fmt::to_string(debug_string_buffer);
174
20.8k
}
175
176
20.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
20.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
20.4k
}
179
180
731k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
731k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
731k
    _nereids_id = tnode.nereids_id;
183
731k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
3.83k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
3.83k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
3.83k
            tnode.intermediate_projections_list.size()) {
189
0
            return Status::InternalError(
190
0
                    "intermediate_output_tuple_id_list size:{} not match "
191
0
                    "intermediate_projections_list size:{}",
192
0
                    tnode.intermediate_output_tuple_id_list.size(),
193
0
                    tnode.intermediate_projections_list.size());
194
0
        }
195
3.83k
    }
196
731k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
731k
    _op_name = substr + "_OPERATOR";
198
199
731k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
731k
    } else if (tnode.__isset.conjuncts) {
202
440k
        for (const auto& conjunct : tnode.conjuncts) {
203
440k
            VExprContextSPtr context;
204
440k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
440k
            _conjuncts.emplace_back(context);
206
440k
        }
207
142k
    }
208
209
    // create the projections expr
210
731k
    if (tnode.__isset.projections) {
211
314k
        DCHECK(tnode.__isset.output_tuple_id);
212
314k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
314k
    }
214
731k
    if (!tnode.intermediate_projections_list.empty()) {
215
3.83k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
3.83k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
8.19k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
8.19k
            VExprContextSPtrs projections;
219
8.19k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
8.19k
            _intermediate_projections.push_back(projections);
221
8.19k
        }
222
3.83k
    }
223
731k
    return Status::OK();
224
731k
}
225
226
765k
Status OperatorXBase::prepare(RuntimeState* state) {
227
765k
    for (auto& conjunct : _conjuncts) {
228
439k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
439k
    }
230
765k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
714k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
593k
            return a->execute_cost() < b->execute_cost();
233
593k
        });
234
714k
    };
235
236
773k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
8.19k
        RETURN_IF_ERROR(
238
8.19k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
8.19k
    }
240
765k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
765k
    if (has_output_row_desc()) {
243
314k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
314k
    }
245
246
765k
    for (auto& conjunct : _conjuncts) {
247
439k
        RETURN_IF_ERROR(conjunct->open(state));
248
439k
    }
249
765k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
765k
    for (auto& projections : _intermediate_projections) {
251
8.19k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
8.19k
    }
253
765k
    if (_child && !is_source()) {
254
144k
        RETURN_IF_ERROR(_child->prepare(state));
255
144k
    }
256
257
765k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
765k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
765k
    return Status::OK();
263
765k
}
264
265
12.3k
Status OperatorXBase::terminate(RuntimeState* state) {
266
12.3k
    if (_child && !is_source()) {
267
2.37k
        RETURN_IF_ERROR(_child->terminate(state));
268
2.37k
    }
269
12.3k
    auto result = state->get_local_state_result(operator_id());
270
12.3k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
12.3k
    return result.value()->terminate(state);
274
12.3k
}
275
276
6.05M
Status OperatorXBase::close(RuntimeState* state) {
277
6.05M
    if (_child && !is_source()) {
278
1.11M
        RETURN_IF_ERROR(_child->close(state));
279
1.11M
    }
280
6.05M
    auto result = state->get_local_state_result(operator_id());
281
6.05M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.05M
    return result.value()->close(state);
285
6.05M
}
286
287
282k
void PipelineXLocalStateBase::clear_origin_block() {
288
282k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
282k
}
290
291
618k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
618k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
618k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
618k
    return Status::OK();
296
618k
}
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
282k
                                     Block* output_block) const {
305
282k
    auto* local_state = state->get_local_state(operator_id());
306
282k
    SCOPED_TIMER(local_state->exec_time_counter());
307
282k
    SCOPED_TIMER(local_state->_projection_timer);
308
282k
    const size_t rows = origin_block->rows();
309
282k
    if (rows == 0) {
310
145k
        return Status::OK();
311
145k
    }
312
136k
    Block input_block = *origin_block;
313
314
136k
    size_t bytes_usage = 0;
315
136k
    ColumnsWithTypeAndName new_columns;
316
136k
    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.39k
        for (int i = 0; i < projections.size(); i++) {
323
7.21k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
7.21k
            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.21k
        }
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
136k
    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
653k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
653k
        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
653k
        } else {
354
653k
            if (_keep_origin || !from->is_exclusive()) {
355
641k
                to->insert_range_from(*from, 0, rows);
356
641k
                bytes_usage += from->allocated_bytes();
357
641k
            } else {
358
12.2k
                to = from->assume_mutable();
359
12.2k
            }
360
653k
        }
361
653k
    };
362
363
136k
    MutableBlock mutable_block =
364
136k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
136k
    if (rows != 0) {
366
136k
        auto& mutable_columns = mutable_block.mutable_columns();
367
136k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
368
789k
        for (int i = 0; i < mutable_columns.size(); ++i) {
369
653k
            ColumnPtr column_ptr;
370
653k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
653k
            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
653k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
653k
            bytes_usage += column_ptr->allocated_bytes();
379
653k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
380
653k
        }
381
136k
        DCHECK(mutable_block.rows() == rows);
382
136k
        output_block->set_columns(std::move(mutable_columns));
383
136k
    }
384
385
136k
    local_state->_estimate_memory_usage += bytes_usage;
386
387
136k
    return Status::OK();
388
136k
}
389
390
4.85M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
391
4.85M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
392
4.85M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
393
4.85M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
394
4.85M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
395
4.85M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
396
4.85M
            if (_debug_point_count++ % 2 == 0) {
397
4.85M
                return Status::OK();
398
4.85M
            }
399
4.85M
        }
400
4.85M
    });
401
402
4.85M
    Status status;
403
4.85M
    auto* local_state = state->get_local_state(operator_id());
404
4.85M
    Defer defer([&]() {
405
4.85M
        if (status.ok()) {
406
4.85M
            local_state->update_output_block_counters(*block);
407
4.85M
        }
408
4.85M
    });
409
4.85M
    if (_output_row_descriptor) {
410
282k
        local_state->clear_origin_block();
411
282k
        status = get_block(state, &local_state->_origin_block, eos);
412
282k
        if (UNLIKELY(!status.ok())) {
413
19
            return status;
414
19
        }
415
282k
        status = do_projections(state, &local_state->_origin_block, block);
416
282k
        return status;
417
282k
    }
418
4.56M
    status = get_block(state, block, eos);
419
4.56M
    RETURN_IF_ERROR(block->check_type_and_column());
420
4.56M
    return status;
421
4.56M
}
422
423
3.05M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
424
3.05M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
425
7.77k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
426
7.77k
        *eos = true;
427
7.77k
    }
428
429
3.05M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
430
3.05M
        auto op_name = to_lower(_parent->_op_name);
431
3.05M
        auto arg_op_name = dp->param<std::string>("op_name");
432
3.05M
        arg_op_name = to_lower(arg_op_name);
433
434
3.05M
        if (op_name == arg_op_name) {
435
3.05M
            *eos = true;
436
3.05M
        }
437
3.05M
    });
438
439
3.05M
    if (auto rows = block->rows()) {
440
845k
        _num_rows_returned += rows;
441
845k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
442
845k
    }
443
3.05M
}
444
445
33.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
446
33.9k
    auto result = state->get_sink_local_state_result();
447
33.9k
    if (!result) {
448
0
        return result.error();
449
0
    }
450
33.9k
    return result.value()->terminate(state);
451
33.9k
}
452
453
20.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
454
20.8k
    fmt::memory_buffer debug_string_buffer;
455
456
20.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
457
20.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
458
20.8k
    return fmt::to_string(debug_string_buffer);
459
20.8k
}
460
461
20.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
462
20.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
463
20.3k
}
464
465
458k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
466
458k
    std::string op_name = "UNKNOWN_SINK";
467
458k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
468
469
458k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
470
457k
        op_name = it->second;
471
457k
    }
472
458k
    _name = op_name + "_OPERATOR";
473
458k
    return Status::OK();
474
458k
}
475
476
209k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
477
209k
    std::string op_name = print_plan_node_type(tnode.node_type);
478
209k
    _nereids_id = tnode.nereids_id;
479
209k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
480
209k
    _name = substr + "_SINK_OPERATOR";
481
209k
    return Status::OK();
482
209k
}
483
484
template <typename LocalStateType>
485
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
486
2.01M
                                                            LocalSinkStateInfo& info) {
487
2.01M
    auto local_state = LocalStateType::create_unique(this, state);
488
2.01M
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.01M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.01M
    return Status::OK();
491
2.01M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
118k
                                                            LocalSinkStateInfo& info) {
487
118k
    auto local_state = LocalStateType::create_unique(this, state);
488
118k
    RETURN_IF_ERROR(local_state->init(state, info));
489
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
118k
    return Status::OK();
491
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
430k
                                                            LocalSinkStateInfo& info) {
487
430k
    auto local_state = LocalStateType::create_unique(this, state);
488
430k
    RETURN_IF_ERROR(local_state->init(state, info));
489
430k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
430k
    return Status::OK();
491
430k
}
_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
524
                                                            LocalSinkStateInfo& info) {
487
524
    auto local_state = LocalStateType::create_unique(this, state);
488
524
    RETURN_IF_ERROR(local_state->init(state, info));
489
524
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
524
    return Status::OK();
491
524
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
43.7k
                                                            LocalSinkStateInfo& info) {
487
43.7k
    auto local_state = LocalStateType::create_unique(this, state);
488
43.7k
    RETURN_IF_ERROR(local_state->init(state, info));
489
43.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
43.7k
    return Status::OK();
491
43.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
8.85k
                                                            LocalSinkStateInfo& info) {
487
8.85k
    auto local_state = LocalStateType::create_unique(this, state);
488
8.85k
    RETURN_IF_ERROR(local_state->init(state, info));
489
8.85k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
8.85k
    return Status::OK();
491
8.85k
}
_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.86k
                                                            LocalSinkStateInfo& info) {
487
6.86k
    auto local_state = LocalStateType::create_unique(this, state);
488
6.86k
    RETURN_IF_ERROR(local_state->init(state, info));
489
6.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
6.86k
    return Status::OK();
491
6.86k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
128
                                                            LocalSinkStateInfo& info) {
487
128
    auto local_state = LocalStateType::create_unique(this, state);
488
128
    RETURN_IF_ERROR(local_state->init(state, info));
489
128
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
128
    return Status::OK();
491
128
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
254k
                                                            LocalSinkStateInfo& info) {
487
254k
    auto local_state = LocalStateType::create_unique(this, state);
488
254k
    RETURN_IF_ERROR(local_state->init(state, info));
489
254k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
254k
    return Status::OK();
491
254k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
31
                                                            LocalSinkStateInfo& info) {
487
31
    auto local_state = LocalStateType::create_unique(this, state);
488
31
    RETURN_IF_ERROR(local_state->init(state, info));
489
31
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
31
    return Status::OK();
491
31
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
269k
                                                            LocalSinkStateInfo& info) {
487
269k
    auto local_state = LocalStateType::create_unique(this, state);
488
269k
    RETURN_IF_ERROR(local_state->init(state, info));
489
269k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
269k
    return Status::OK();
491
269k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
151k
                                                            LocalSinkStateInfo& info) {
487
151k
    auto local_state = LocalStateType::create_unique(this, state);
488
151k
    RETURN_IF_ERROR(local_state->init(state, info));
489
151k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
151k
    return Status::OK();
491
151k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
295
                                                            LocalSinkStateInfo& info) {
487
295
    auto local_state = LocalStateType::create_unique(this, state);
488
295
    RETURN_IF_ERROR(local_state->init(state, info));
489
295
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
295
    return Status::OK();
491
295
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
230
                                                            LocalSinkStateInfo& info) {
487
230
    auto local_state = LocalStateType::create_unique(this, state);
488
230
    RETURN_IF_ERROR(local_state->init(state, info));
489
230
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
230
    return Status::OK();
491
230
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
680k
                                                            LocalSinkStateInfo& info) {
487
680k
    auto local_state = LocalStateType::create_unique(this, state);
488
680k
    RETURN_IF_ERROR(local_state->init(state, info));
489
680k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
680k
    return Status::OK();
491
680k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
12.0k
                                                            LocalSinkStateInfo& info) {
487
12.0k
    auto local_state = LocalStateType::create_unique(this, state);
488
12.0k
    RETURN_IF_ERROR(local_state->init(state, info));
489
12.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
12.0k
    return Status::OK();
491
12.0k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
5.80k
                                                            LocalSinkStateInfo& info) {
487
5.80k
    auto local_state = LocalStateType::create_unique(this, state);
488
5.80k
    RETURN_IF_ERROR(local_state->init(state, info));
489
5.80k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
5.80k
    return Status::OK();
491
5.80k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
5.66k
                                                            LocalSinkStateInfo& info) {
487
5.66k
    auto local_state = LocalStateType::create_unique(this, state);
488
5.66k
    RETURN_IF_ERROR(local_state->init(state, info));
489
5.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
5.66k
    return Status::OK();
491
5.66k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
290
                                                            LocalSinkStateInfo& info) {
487
290
    auto local_state = LocalStateType::create_unique(this, state);
488
290
    RETURN_IF_ERROR(local_state->init(state, info));
489
290
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
290
    return Status::OK();
491
290
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
4.60k
                                                            LocalSinkStateInfo& info) {
487
4.60k
    auto local_state = LocalStateType::create_unique(this, state);
488
4.60k
    RETURN_IF_ERROR(local_state->init(state, info));
489
4.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
4.60k
    return Status::OK();
491
4.60k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
2.57k
                                                            LocalSinkStateInfo& info) {
487
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
488
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.57k
    return Status::OK();
491
2.57k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
2.40k
                                                            LocalSinkStateInfo& info) {
487
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
488
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.40k
    return Status::OK();
491
2.40k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
2.50k
                                                            LocalSinkStateInfo& info) {
487
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
488
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.50k
    return Status::OK();
491
2.50k
}
_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
165
                                                            LocalSinkStateInfo& info) {
487
165
    auto local_state = LocalStateType::create_unique(this, state);
488
165
    RETURN_IF_ERROR(local_state->init(state, info));
489
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
165
    return Status::OK();
491
165
}
_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.70M
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.70M
    } else {
502
1.70M
        auto ss = LocalStateType::SharedStateType::create_shared();
503
1.70M
        ss->id = operator_id();
504
1.70M
        for (auto& dest : dests_id()) {
505
1.69M
            ss->related_op_ids.insert(dest);
506
1.69M
        }
507
1.70M
        return ss;
508
1.70M
    }
509
1.70M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
100k
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
100k
    } else {
502
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
100k
        ss->id = operator_id();
504
100k
        for (auto& dest : dests_id()) {
505
100k
            ss->related_op_ids.insert(dest);
506
100k
        }
507
100k
        return ss;
508
100k
    }
509
100k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
430k
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
430k
    } else {
502
430k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
430k
        ss->id = operator_id();
504
430k
        for (auto& dest : dests_id()) {
505
429k
            ss->related_op_ids.insert(dest);
506
429k
        }
507
430k
        return ss;
508
430k
    }
509
430k
}
_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
524
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
524
    } else {
502
524
        auto ss = LocalStateType::SharedStateType::create_shared();
503
524
        ss->id = operator_id();
504
524
        for (auto& dest : dests_id()) {
505
524
            ss->related_op_ids.insert(dest);
506
524
        }
507
524
        return ss;
508
524
    }
509
524
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
43.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
43.7k
    } else {
502
43.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
43.7k
        ss->id = operator_id();
504
43.7k
        for (auto& dest : dests_id()) {
505
43.6k
            ss->related_op_ids.insert(dest);
506
43.6k
        }
507
43.7k
        return ss;
508
43.7k
    }
509
43.7k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
494
8.85k
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.85k
    } else {
502
8.85k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
8.85k
        ss->id = operator_id();
504
8.85k
        for (auto& dest : dests_id()) {
505
8.85k
            ss->related_op_ids.insert(dest);
506
8.85k
        }
507
8.85k
        return ss;
508
8.85k
    }
509
8.85k
}
_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.14k
            ss->related_op_ids.insert(dest);
506
5.14k
        }
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.88k
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.88k
    } else {
502
6.88k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
6.88k
        ss->id = operator_id();
504
6.88k
        for (auto& dest : dests_id()) {
505
6.88k
            ss->related_op_ids.insert(dest);
506
6.88k
        }
507
6.88k
        return ss;
508
6.88k
    }
509
6.88k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
128
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
128
    } else {
502
128
        auto ss = LocalStateType::SharedStateType::create_shared();
503
128
        ss->id = operator_id();
504
128
        for (auto& dest : dests_id()) {
505
128
            ss->related_op_ids.insert(dest);
506
128
        }
507
128
        return ss;
508
128
    }
509
128
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
254k
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
254k
    } else {
502
254k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
254k
        ss->id = operator_id();
504
254k
        for (auto& dest : dests_id()) {
505
254k
            ss->related_op_ids.insert(dest);
506
254k
        }
507
254k
        return ss;
508
254k
    }
509
254k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
33
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
33
    } else {
502
33
        auto ss = LocalStateType::SharedStateType::create_shared();
503
33
        ss->id = operator_id();
504
33
        for (auto& dest : dests_id()) {
505
33
            ss->related_op_ids.insert(dest);
506
33
        }
507
33
        return ss;
508
33
    }
509
33
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
151k
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
151k
    } else {
502
151k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
151k
        ss->id = operator_id();
504
151k
        for (auto& dest : dests_id()) {
505
151k
            ss->related_op_ids.insert(dest);
506
151k
        }
507
151k
        return ss;
508
151k
    }
509
151k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
229
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
229
    } else {
502
229
        auto ss = LocalStateType::SharedStateType::create_shared();
503
229
        ss->id = operator_id();
504
229
        for (auto& dest : dests_id()) {
505
229
            ss->related_op_ids.insert(dest);
506
229
        }
507
229
        return ss;
508
229
    }
509
229
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
679k
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
679k
    } else {
502
679k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
679k
        ss->id = operator_id();
504
679k
        for (auto& dest : dests_id()) {
505
676k
            ss->related_op_ids.insert(dest);
506
676k
        }
507
679k
        return ss;
508
679k
    }
509
679k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
12.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
12.0k
    } else {
502
12.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
12.0k
        ss->id = operator_id();
504
12.0k
        for (auto& dest : dests_id()) {
505
12.0k
            ss->related_op_ids.insert(dest);
506
12.0k
        }
507
12.0k
        return ss;
508
12.0k
    }
509
12.0k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
390
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
390
    } else {
502
390
        auto ss = LocalStateType::SharedStateType::create_shared();
503
390
        ss->id = operator_id();
504
391
        for (auto& dest : dests_id()) {
505
391
            ss->related_op_ids.insert(dest);
506
391
        }
507
390
        return ss;
508
390
    }
509
390
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
494
2.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
2.38k
    } else {
502
2.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
2.38k
        ss->id = operator_id();
504
2.38k
        for (auto& dest : dests_id()) {
505
2.38k
            ss->related_op_ids.insert(dest);
506
2.38k
        }
507
2.38k
        return ss;
508
2.38k
    }
509
2.38k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
494
2.51k
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.51k
    } else {
502
2.51k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
2.51k
        ss->id = operator_id();
504
2.51k
        for (auto& dest : dests_id()) {
505
2.49k
            ss->related_op_ids.insert(dest);
506
2.49k
        }
507
2.51k
        return ss;
508
2.51k
    }
509
2.51k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
165
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
165
    } else {
502
165
        auto ss = LocalStateType::SharedStateType::create_shared();
503
165
        ss->id = operator_id();
504
165
        for (auto& dest : dests_id()) {
505
165
            ss->related_op_ids.insert(dest);
506
165
        }
507
165
        return ss;
508
165
    }
509
165
}
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.49M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.49M
    auto local_state = LocalStateType::create_unique(state, this);
514
2.49M
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.49M
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.49M
    return Status::OK();
517
2.49M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
70.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
70.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
70.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
70.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
70.7k
    return Status::OK();
517
70.7k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
285k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
285k
    auto local_state = LocalStateType::create_unique(state, this);
514
285k
    RETURN_IF_ERROR(local_state->init(state, info));
515
285k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
285k
    return Status::OK();
517
285k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
78
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
78
    auto local_state = LocalStateType::create_unique(state, this);
514
78
    RETURN_IF_ERROR(local_state->init(state, info));
515
78
    state->emplace_local_state(operator_id(), std::move(local_state));
516
78
    return Status::OK();
517
78
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
32.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
32.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
32.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
32.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
32.7k
    return Status::OK();
517
32.7k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
6.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
6.85k
    auto local_state = LocalStateType::create_unique(state, this);
514
6.85k
    RETURN_IF_ERROR(local_state->init(state, info));
515
6.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
6.85k
    return Status::OK();
517
6.85k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
7.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
7.31k
    auto local_state = LocalStateType::create_unique(state, this);
514
7.31k
    RETURN_IF_ERROR(local_state->init(state, info));
515
7.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
7.31k
    return Status::OK();
517
7.31k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
25
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
25
    auto local_state = LocalStateType::create_unique(state, this);
514
25
    RETURN_IF_ERROR(local_state->init(state, info));
515
25
    state->emplace_local_state(operator_id(), std::move(local_state));
516
25
    return Status::OK();
517
25
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
246k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
246k
    auto local_state = LocalStateType::create_unique(state, this);
514
246k
    RETURN_IF_ERROR(local_state->init(state, info));
515
246k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
246k
    return Status::OK();
517
246k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
151k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
151k
    auto local_state = LocalStateType::create_unique(state, this);
514
151k
    RETURN_IF_ERROR(local_state->init(state, info));
515
151k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
151k
    return Status::OK();
517
151k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
387
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
387
    auto local_state = LocalStateType::create_unique(state, this);
514
387
    RETURN_IF_ERROR(local_state->init(state, info));
515
387
    state->emplace_local_state(operator_id(), std::move(local_state));
516
387
    return Status::OK();
517
387
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
220
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
220
    auto local_state = LocalStateType::create_unique(state, this);
514
220
    RETURN_IF_ERROR(local_state->init(state, info));
515
220
    state->emplace_local_state(operator_id(), std::move(local_state));
516
220
    return Status::OK();
517
220
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
3.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
3.51k
    auto local_state = LocalStateType::create_unique(state, this);
514
3.51k
    RETURN_IF_ERROR(local_state->init(state, info));
515
3.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
3.51k
    return Status::OK();
517
3.51k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
393k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
393k
    auto local_state = LocalStateType::create_unique(state, this);
514
393k
    RETURN_IF_ERROR(local_state->init(state, info));
515
393k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
393k
    return Status::OK();
517
393k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.13k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.13k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.13k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.13k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.13k
    return Status::OK();
517
1.13k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
12.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
12.0k
    auto local_state = LocalStateType::create_unique(state, this);
514
12.0k
    RETURN_IF_ERROR(local_state->init(state, info));
515
12.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
12.0k
    return Status::OK();
517
12.0k
}
_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.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.59k
    return Status::OK();
517
1.59k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
54.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
54.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
54.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
54.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
54.7k
    return Status::OK();
517
54.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
15.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
15.6k
    auto local_state = LocalStateType::create_unique(state, this);
514
15.6k
    RETURN_IF_ERROR(local_state->init(state, info));
515
15.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
15.6k
    return Status::OK();
517
15.6k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
286
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
286
    auto local_state = LocalStateType::create_unique(state, this);
514
286
    RETURN_IF_ERROR(local_state->init(state, info));
515
286
    state->emplace_local_state(operator_id(), std::move(local_state));
516
286
    return Status::OK();
517
286
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
2.40k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.40k
    auto local_state = LocalStateType::create_unique(state, this);
514
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.40k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.40k
    return Status::OK();
517
2.40k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
2.52k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.52k
    auto local_state = LocalStateType::create_unique(state, this);
514
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.52k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.52k
    return Status::OK();
517
2.52k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
461
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
461
    auto local_state = LocalStateType::create_unique(state, this);
514
461
    RETURN_IF_ERROR(local_state->init(state, info));
515
461
    state->emplace_local_state(operator_id(), std::move(local_state));
516
461
    return Status::OK();
517
461
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
2.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.02k
    auto local_state = LocalStateType::create_unique(state, this);
514
2.02k
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.02k
    return Status::OK();
517
2.02k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
7.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
7.58k
    auto local_state = LocalStateType::create_unique(state, this);
514
7.58k
    RETURN_IF_ERROR(local_state->init(state, info));
515
7.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
7.58k
    return Status::OK();
517
7.58k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
724k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
724k
    auto local_state = LocalStateType::create_unique(state, this);
514
724k
    RETURN_IF_ERROR(local_state->init(state, info));
515
724k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
724k
    return Status::OK();
517
724k
}
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
3.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
3.31k
    auto local_state = LocalStateType::create_unique(state, this);
514
3.31k
    RETURN_IF_ERROR(local_state->init(state, info));
515
3.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
3.31k
    return Status::OK();
517
3.31k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
14.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
14.9k
    auto local_state = LocalStateType::create_unique(state, this);
514
14.9k
    RETURN_IF_ERROR(local_state->init(state, info));
515
14.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
14.9k
    return Status::OK();
517
14.9k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
450k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
450k
    auto local_state = LocalStateType::create_unique(state, this);
514
450k
    RETURN_IF_ERROR(local_state->init(state, info));
515
450k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
450k
    return Status::OK();
517
450k
}
518
519
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
520
                                                         RuntimeState* state)
521
2.01M
        : _parent(parent), _state(state) {}
522
523
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
524
2.49M
        : _num_rows_returned(0),
525
2.49M
          _rows_returned_counter(nullptr),
526
2.49M
          _parent(parent),
527
2.49M
          _state(state),
528
2.49M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
529
530
template <typename SharedStateArg>
531
2.50M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
2.50M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
2.50M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
2.50M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
2.50M
    _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.50M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
2.50M
    _operator_profile->add_child(_common_profile.get(), true);
540
2.50M
    _operator_profile->add_child(_custom_profile.get(), true);
541
2.50M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
2.50M
    if constexpr (!is_fake_shared) {
543
1.30M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
743k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
743k
                                    .first.get()
546
743k
                                    ->template cast<SharedStateArg>();
547
548
743k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
743k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
743k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
743k
        } else if (info.shared_state) {
552
498k
            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
498k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
498k
            _dependency = _shared_state->create_source_dependency(
559
498k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
498k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
498k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
498k
        } else {
563
58.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
2.57k
                DCHECK(false);
565
2.57k
            }
566
58.4k
        }
567
1.30M
    }
568
569
2.50M
    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.50M
    _rows_returned_counter =
574
2.50M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
2.50M
    _blocks_returned_counter =
576
2.50M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
2.50M
    _output_block_bytes_counter =
578
2.50M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
2.50M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
2.50M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
2.50M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
2.50M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
2.50M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
2.50M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
2.50M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
2.50M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
2.50M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
2.50M
    _memory_used_counter =
589
2.50M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
2.50M
    _common_profile->add_info_string("IsColocate",
591
2.50M
                                     std::to_string(_parent->is_colocated_operator()));
592
2.50M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
2.50M
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
2.50M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
2.50M
    return Status::OK();
596
2.50M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
70.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
70.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
70.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
70.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
70.8k
    _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
70.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
70.8k
    _operator_profile->add_child(_common_profile.get(), true);
540
70.8k
    _operator_profile->add_child(_custom_profile.get(), true);
541
70.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
70.8k
    if constexpr (!is_fake_shared) {
543
70.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
18.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
18.6k
                                    .first.get()
546
18.6k
                                    ->template cast<SharedStateArg>();
547
548
18.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
18.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
18.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
52.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
51.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
51.8k
            _dependency = _shared_state->create_source_dependency(
559
51.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
51.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
51.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
51.8k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
395
        }
567
70.8k
    }
568
569
70.8k
    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
70.8k
    _rows_returned_counter =
574
70.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
70.8k
    _blocks_returned_counter =
576
70.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
70.8k
    _output_block_bytes_counter =
578
70.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
70.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
70.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
70.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
70.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
70.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
70.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
70.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
70.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
70.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
70.8k
    _memory_used_counter =
589
70.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
70.8k
    _common_profile->add_info_string("IsColocate",
591
70.8k
                                     std::to_string(_parent->is_colocated_operator()));
592
70.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
70.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
70.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
70.8k
    return Status::OK();
596
70.8k
}
_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
254k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
254k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
254k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
254k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
254k
    _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
254k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
254k
    _operator_profile->add_child(_common_profile.get(), true);
540
254k
    _operator_profile->add_child(_custom_profile.get(), true);
541
254k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
254k
    if constexpr (!is_fake_shared) {
543
254k
        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
254k
        } 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
252k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
252k
            _dependency = _shared_state->create_source_dependency(
559
252k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
252k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
252k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
252k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
2.83k
        }
567
254k
    }
568
569
254k
    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
254k
    _rows_returned_counter =
574
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
254k
    _blocks_returned_counter =
576
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
254k
    _output_block_bytes_counter =
578
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
254k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
254k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
254k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
254k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
254k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
254k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
254k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
254k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
254k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
254k
    _memory_used_counter =
589
254k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
254k
    _common_profile->add_info_string("IsColocate",
591
254k
                                     std::to_string(_parent->is_colocated_operator()));
592
254k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
254k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
254k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
254k
    return Status::OK();
596
254k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
25
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
25
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
25
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
25
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
25
    _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
25
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
25
    _operator_profile->add_child(_common_profile.get(), true);
540
25
    _operator_profile->add_child(_custom_profile.get(), true);
541
25
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
25
    if constexpr (!is_fake_shared) {
543
25
        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
25
        } 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
25
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
25
            _dependency = _shared_state->create_source_dependency(
559
25
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
25
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
25
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
25
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
25
    }
568
569
25
    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
25
    _rows_returned_counter =
574
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
25
    _blocks_returned_counter =
576
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
25
    _output_block_bytes_counter =
578
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
25
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
25
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
25
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
25
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
25
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
25
    _memory_used_counter =
589
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
25
    _common_profile->add_info_string("IsColocate",
591
25
                                     std::to_string(_parent->is_colocated_operator()));
592
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
25
    return Status::OK();
596
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
12.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
12.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
12.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
12.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
12.0k
    _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
12.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
12.0k
    _operator_profile->add_child(_common_profile.get(), true);
540
12.0k
    _operator_profile->add_child(_custom_profile.get(), true);
541
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
12.0k
    if constexpr (!is_fake_shared) {
543
12.0k
        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
12.0k
        } 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
12.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
12.0k
            _dependency = _shared_state->create_source_dependency(
559
12.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
12.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
12.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
12.0k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
20
        }
567
12.0k
    }
568
569
12.0k
    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
12.0k
    _rows_returned_counter =
574
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
12.0k
    _blocks_returned_counter =
576
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
12.0k
    _output_block_bytes_counter =
578
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
12.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
12.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
12.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
12.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
12.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
12.0k
    _memory_used_counter =
589
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
12.0k
    _common_profile->add_info_string("IsColocate",
591
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
592
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
12.0k
    return Status::OK();
596
12.0k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
6.89k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
6.89k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
6.89k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
6.89k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
6.89k
    _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.89k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
6.89k
    _operator_profile->add_child(_common_profile.get(), true);
540
6.89k
    _operator_profile->add_child(_custom_profile.get(), true);
541
6.89k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
6.89k
    if constexpr (!is_fake_shared) {
543
6.89k
        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.89k
        } 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.81k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
6.81k
            _dependency = _shared_state->create_source_dependency(
559
6.81k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
6.81k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
6.81k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
6.81k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
74
        }
567
6.89k
    }
568
569
6.89k
    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.89k
    _rows_returned_counter =
574
6.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
6.89k
    _blocks_returned_counter =
576
6.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
6.89k
    _output_block_bytes_counter =
578
6.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
6.89k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
6.89k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
6.89k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
6.89k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
6.89k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
6.89k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
6.89k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
6.89k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
6.89k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
6.89k
    _memory_used_counter =
589
6.89k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
6.89k
    _common_profile->add_info_string("IsColocate",
591
6.89k
                                     std::to_string(_parent->is_colocated_operator()));
592
6.89k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
6.89k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
6.89k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
6.89k
    return Status::OK();
596
6.89k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
151k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
151k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
151k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
151k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
151k
    _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
151k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
151k
    _operator_profile->add_child(_common_profile.get(), true);
540
151k
    _operator_profile->add_child(_custom_profile.get(), true);
541
151k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
151k
    if constexpr (!is_fake_shared) {
543
151k
        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
151k
        } 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
151k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
151k
            _dependency = _shared_state->create_source_dependency(
559
151k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
151k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
151k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
151k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
569
        }
567
151k
    }
568
569
151k
    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
151k
    _rows_returned_counter =
574
151k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
151k
    _blocks_returned_counter =
576
151k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
151k
    _output_block_bytes_counter =
578
151k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
151k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
151k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
151k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
151k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
151k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
151k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
151k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
151k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
151k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
151k
    _memory_used_counter =
589
151k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
151k
    _common_profile->add_info_string("IsColocate",
591
151k
                                     std::to_string(_parent->is_colocated_operator()));
592
151k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
151k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
151k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
151k
    return Status::OK();
596
151k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
388
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
388
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
388
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
388
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
388
    _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
388
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
388
    _operator_profile->add_child(_common_profile.get(), true);
540
388
    _operator_profile->add_child(_custom_profile.get(), true);
541
388
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
388
    if constexpr (!is_fake_shared) {
543
388
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
388
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
388
                                    .first.get()
546
388
                                    ->template cast<SharedStateArg>();
547
548
388
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
388
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
388
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
388
        } 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
0
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
388
    }
568
569
388
    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
388
    _rows_returned_counter =
574
388
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
388
    _blocks_returned_counter =
576
388
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
388
    _output_block_bytes_counter =
578
388
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
388
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
388
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
388
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
388
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
388
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
388
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
388
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
388
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
388
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
388
    _memory_used_counter =
589
388
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
388
    _common_profile->add_info_string("IsColocate",
591
388
                                     std::to_string(_parent->is_colocated_operator()));
592
388
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
388
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
388
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
388
    return Status::OK();
596
388
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
220
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
220
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
220
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
220
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
220
    _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
220
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
220
    _operator_profile->add_child(_common_profile.get(), true);
540
220
    _operator_profile->add_child(_custom_profile.get(), true);
541
220
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
220
    if constexpr (!is_fake_shared) {
543
220
        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
220
        } 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
220
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
220
            _dependency = _shared_state->create_source_dependency(
559
220
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
220
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
220
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
220
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
220
    }
568
569
220
    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
220
    _rows_returned_counter =
574
220
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
220
    _blocks_returned_counter =
576
220
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
220
    _output_block_bytes_counter =
578
220
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
220
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
220
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
220
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
220
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
220
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
220
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
220
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
220
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
220
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
220
    _memory_used_counter =
589
220
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
220
    _common_profile->add_info_string("IsColocate",
591
220
                                     std::to_string(_parent->is_colocated_operator()));
592
220
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
220
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
220
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
220
    return Status::OK();
596
220
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1.20M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1.20M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1.20M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1.20M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1.20M
    _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.20M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1.20M
    _operator_profile->add_child(_common_profile.get(), true);
540
1.20M
    _operator_profile->add_child(_custom_profile.get(), true);
541
1.20M
    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.20M
    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.20M
    _rows_returned_counter =
574
1.20M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1.20M
    _blocks_returned_counter =
576
1.20M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1.20M
    _output_block_bytes_counter =
578
1.20M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
1.20M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
1.20M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
1.20M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
1.20M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
1.20M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
1.20M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
1.20M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
1.20M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
1.20M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
1.20M
    _memory_used_counter =
589
1.20M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
1.20M
    _common_profile->add_info_string("IsColocate",
591
1.20M
                                     std::to_string(_parent->is_colocated_operator()));
592
1.20M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
1.20M
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
1.20M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
1.20M
    return Status::OK();
596
1.20M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
54.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
54.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
54.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
54.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
54.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
54.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
54.7k
    _operator_profile->add_child(_common_profile.get(), true);
540
54.7k
    _operator_profile->add_child(_custom_profile.get(), true);
541
54.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
54.7k
    if constexpr (!is_fake_shared) {
543
54.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
54.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
2.80k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
2.80k
            _dependency = _shared_state->create_source_dependency(
559
2.80k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
2.80k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
2.80k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
51.9k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
51.9k
        }
567
54.7k
    }
568
569
54.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
54.7k
    _rows_returned_counter =
574
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
54.7k
    _blocks_returned_counter =
576
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
54.7k
    _output_block_bytes_counter =
578
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
54.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
54.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
54.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
54.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
54.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
54.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
54.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
54.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
54.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
54.7k
    _memory_used_counter =
589
54.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
54.7k
    _common_profile->add_info_string("IsColocate",
591
54.7k
                                     std::to_string(_parent->is_colocated_operator()));
592
54.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
54.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
54.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
54.7k
    return Status::OK();
596
54.7k
}
_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
15.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
15.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
15.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
15.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
15.6k
    _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
15.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
15.6k
    _operator_profile->add_child(_common_profile.get(), true);
540
15.6k
    _operator_profile->add_child(_custom_profile.get(), true);
541
15.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
15.6k
    if constexpr (!is_fake_shared) {
543
15.6k
        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
15.6k
        } 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
15.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
15.6k
            _dependency = _shared_state->create_source_dependency(
559
15.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
15.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
15.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
15.6k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
1
        }
567
15.6k
    }
568
569
15.6k
    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
15.6k
    _rows_returned_counter =
574
15.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
15.6k
    _blocks_returned_counter =
576
15.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
15.6k
    _output_block_bytes_counter =
578
15.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
15.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
15.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
15.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
15.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
15.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
15.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
15.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
15.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
15.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
15.6k
    _memory_used_counter =
589
15.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
15.6k
    _common_profile->add_info_string("IsColocate",
591
15.6k
                                     std::to_string(_parent->is_colocated_operator()));
592
15.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
15.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
15.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
15.6k
    return Status::OK();
596
15.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
392
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
392
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
392
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
392
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
392
    _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
392
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
392
    _operator_profile->add_child(_common_profile.get(), true);
540
392
    _operator_profile->add_child(_custom_profile.get(), true);
541
392
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
392
    if constexpr (!is_fake_shared) {
543
392
        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
392
        } 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
392
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
392
            _dependency = _shared_state->create_source_dependency(
559
392
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
392
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
392
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
392
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
392
    }
568
569
392
    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
392
    _rows_returned_counter =
574
392
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
392
    _blocks_returned_counter =
576
392
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
392
    _output_block_bytes_counter =
578
392
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
392
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
392
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
392
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
392
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
392
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
392
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
392
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
392
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
392
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
392
    _memory_used_counter =
589
392
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
392
    _common_profile->add_info_string("IsColocate",
591
392
                                     std::to_string(_parent->is_colocated_operator()));
592
392
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
392
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
392
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
392
    return Status::OK();
596
392
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
4.94k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
4.94k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
4.94k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
4.94k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
4.94k
    _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
4.94k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
4.94k
    _operator_profile->add_child(_common_profile.get(), true);
540
4.94k
    _operator_profile->add_child(_custom_profile.get(), true);
541
4.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
4.94k
    if constexpr (!is_fake_shared) {
543
4.94k
        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
4.94k
        } 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
4.92k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
4.92k
            _dependency = _shared_state->create_source_dependency(
559
4.92k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
4.92k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
4.92k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
4.92k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
20
        }
567
4.94k
    }
568
569
4.94k
    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
4.94k
    _rows_returned_counter =
574
4.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
4.94k
    _blocks_returned_counter =
576
4.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
4.94k
    _output_block_bytes_counter =
578
4.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
4.94k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
4.94k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
4.94k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
4.94k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
4.94k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
4.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
4.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
4.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
4.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
4.94k
    _memory_used_counter =
589
4.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
4.94k
    _common_profile->add_info_string("IsColocate",
591
4.94k
                                     std::to_string(_parent->is_colocated_operator()));
592
4.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
4.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
4.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
4.94k
    return Status::OK();
596
4.94k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
727k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
727k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
727k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
727k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
727k
    _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
727k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
727k
    _operator_profile->add_child(_common_profile.get(), true);
540
727k
    _operator_profile->add_child(_custom_profile.get(), true);
541
727k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
727k
    if constexpr (!is_fake_shared) {
543
727k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
724k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
724k
                                    .first.get()
546
724k
                                    ->template cast<SharedStateArg>();
547
548
724k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
724k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
724k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
724k
        } 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
2.57k
        } else {
563
2.57k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
2.57k
                DCHECK(false);
565
2.57k
            }
566
2.57k
        }
567
727k
    }
568
569
727k
    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
727k
    _rows_returned_counter =
574
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
727k
    _blocks_returned_counter =
576
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
727k
    _output_block_bytes_counter =
578
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
727k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
727k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
727k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
727k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
727k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
727k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
727k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
727k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
727k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
727k
    _memory_used_counter =
589
727k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
727k
    _common_profile->add_info_string("IsColocate",
591
727k
                                     std::to_string(_parent->is_colocated_operator()));
592
727k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
727k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
727k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
727k
    return Status::OK();
596
727k
}
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.50M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
2.50M
    _conjuncts.resize(_parent->_conjuncts.size());
601
2.50M
    _projections.resize(_parent->_projections.size());
602
2.98M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
484k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
484k
    }
605
5.17M
    for (size_t i = 0; i < _projections.size(); i++) {
606
2.67M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
2.67M
    }
608
2.50M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
2.51M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
14.3k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
92.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
78.3k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
78.3k
                    state, _intermediate_projections[i][j]));
614
78.3k
        }
615
14.3k
    }
616
2.50M
    return Status::OK();
617
2.50M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
70.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
70.8k
    _conjuncts.resize(_parent->_conjuncts.size());
601
70.8k
    _projections.resize(_parent->_projections.size());
602
71.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
973
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
973
    }
605
357k
    for (size_t i = 0; i < _projections.size(); i++) {
606
286k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
286k
    }
608
70.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
72.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
1.31k
        _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.31k
    }
616
70.8k
    return Status::OK();
617
70.8k
}
_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
255k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
255k
    _conjuncts.resize(_parent->_conjuncts.size());
601
255k
    _projections.resize(_parent->_projections.size());
602
255k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
255k
    for (size_t i = 0; i < _projections.size(); i++) {
606
354
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
354
    }
608
255k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
255k
    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
255k
    return Status::OK();
617
255k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
25
    _conjuncts.resize(_parent->_conjuncts.size());
601
25
    _projections.resize(_parent->_projections.size());
602
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
25
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
25
    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
25
    return Status::OK();
617
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
12.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
12.0k
    _conjuncts.resize(_parent->_conjuncts.size());
601
12.0k
    _projections.resize(_parent->_projections.size());
602
12.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
87
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
87
    }
605
81.4k
    for (size_t i = 0; i < _projections.size(); i++) {
606
69.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
69.4k
    }
608
12.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
12.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
145
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
873
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
728
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
728
                    state, _intermediate_projections[i][j]));
614
728
        }
615
145
    }
616
12.0k
    return Status::OK();
617
12.0k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
6.90k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
6.90k
    _conjuncts.resize(_parent->_conjuncts.size());
601
6.90k
    _projections.resize(_parent->_projections.size());
602
7.57k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
672
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
672
    }
605
19.3k
    for (size_t i = 0; i < _projections.size(); i++) {
606
12.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
12.4k
    }
608
6.90k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
6.99k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
89
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
673
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
584
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
584
                    state, _intermediate_projections[i][j]));
614
584
        }
615
89
    }
616
6.90k
    return Status::OK();
617
6.90k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
151k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
151k
    _conjuncts.resize(_parent->_conjuncts.size());
601
151k
    _projections.resize(_parent->_projections.size());
602
155k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
3.61k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
3.61k
    }
605
410k
    for (size_t i = 0; i < _projections.size(); i++) {
606
259k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
259k
    }
608
151k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
151k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
232
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
1.63k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
1.40k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
1.40k
                    state, _intermediate_projections[i][j]));
614
1.40k
        }
615
232
    }
616
151k
    return Status::OK();
617
151k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
386
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
386
    _conjuncts.resize(_parent->_conjuncts.size());
601
386
    _projections.resize(_parent->_projections.size());
602
390
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
4
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
4
    }
605
1.45k
    for (size_t i = 0; i < _projections.size(); i++) {
606
1.06k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
1.06k
    }
608
386
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
386
    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
386
    return Status::OK();
617
386
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
224
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
224
    _conjuncts.resize(_parent->_conjuncts.size());
601
224
    _projections.resize(_parent->_projections.size());
602
224
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
500
    for (size_t i = 0; i < _projections.size(); i++) {
606
276
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
276
    }
608
224
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
224
    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
224
    return Status::OK();
617
224
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
1.20M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
1.20M
    _conjuncts.resize(_parent->_conjuncts.size());
601
1.20M
    _projections.resize(_parent->_projections.size());
602
1.67M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
473k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
473k
    }
605
3.15M
    for (size_t i = 0; i < _projections.size(); i++) {
606
1.95M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
1.95M
    }
608
1.20M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
1.21M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
12.5k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
75.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
62.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
62.6k
                    state, _intermediate_projections[i][j]));
614
62.6k
        }
615
12.5k
    }
616
1.20M
    return Status::OK();
617
1.20M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
54.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
54.8k
    _conjuncts.resize(_parent->_conjuncts.size());
601
54.8k
    _projections.resize(_parent->_projections.size());
602
54.8k
    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.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
93.5k
    }
608
54.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
54.8k
    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
54.8k
    return Status::OK();
617
54.8k
}
_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
15.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
15.6k
    _conjuncts.resize(_parent->_conjuncts.size());
601
15.6k
    _projections.resize(_parent->_projections.size());
602
20.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
5.01k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
5.01k
    }
605
15.6k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
15.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
15.6k
    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
15.6k
    return Status::OK();
617
15.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
393
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
393
    _conjuncts.resize(_parent->_conjuncts.size());
601
393
    _projections.resize(_parent->_projections.size());
602
393
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
393
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
393
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
393
    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
393
    return Status::OK();
617
393
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
4.94k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
4.94k
    _conjuncts.resize(_parent->_conjuncts.size());
601
4.94k
    _projections.resize(_parent->_projections.size());
602
4.94k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
4.94k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
4.94k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
4.94k
    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
4.94k
    return Status::OK();
617
4.94k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
727k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
727k
    _conjuncts.resize(_parent->_conjuncts.size());
601
727k
    _projections.resize(_parent->_projections.size());
602
727k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
727k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
727k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
727k
    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
727k
    return Status::OK();
617
727k
}
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
12.3k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
12.3k
    if (_terminated) {
622
2
        return Status::OK();
623
2
    }
624
12.3k
    _terminated = true;
625
12.3k
    return Status::OK();
626
12.3k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
1.43k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
1.43k
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
1.43k
    _terminated = true;
625
1.43k
    return Status::OK();
626
1.43k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
86
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
86
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
86
    _terminated = true;
625
86
    return Status::OK();
626
86
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
231
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
231
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
231
    _terminated = true;
625
231
    return Status::OK();
626
231
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
3
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
3
    _terminated = true;
625
3
    return Status::OK();
626
3
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
458
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
458
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
458
    _terminated = true;
625
458
    return Status::OK();
626
458
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
8.68k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
8.68k
    if (_terminated) {
622
1
        return Status::OK();
623
1
    }
624
8.68k
    _terminated = true;
625
8.68k
    return Status::OK();
626
8.68k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
5
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
5
    _terminated = true;
625
5
    return Status::OK();
626
5
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
26
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
26
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
26
    _terminated = true;
625
26
    return Status::OK();
626
26
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
3
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
3
    _terminated = true;
625
3
    return Status::OK();
626
3
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
4
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
4
    _terminated = true;
625
4
    return Status::OK();
626
4
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
1.35k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
1.35k
    if (_terminated) {
622
1
        return Status::OK();
623
1
    }
624
1.35k
    _terminated = true;
625
1.35k
    return Status::OK();
626
1.35k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
14
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
14
    _terminated = true;
625
14
    return Status::OK();
626
14
}
627
628
template <typename SharedStateArg>
629
2.78M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
2.78M
    if (_closed) {
631
284k
        return Status::OK();
632
284k
    }
633
2.50M
    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.50M
    _closed = true;
637
2.50M
    return Status::OK();
638
2.78M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
70.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
70.8k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
70.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
70.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
70.8k
    }
636
70.8k
    _closed = true;
637
70.8k
    return Status::OK();
638
70.8k
}
_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
507k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
507k
    if (_closed) {
631
253k
        return Status::OK();
632
253k
    }
633
253k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
253k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
253k
    }
636
253k
    _closed = true;
637
253k
    return Status::OK();
638
507k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
25
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
25
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
25
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
25
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
25
    }
636
25
    _closed = true;
637
25
    return Status::OK();
638
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
12.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
12.0k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
12.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
12.0k
    }
636
12.0k
    _closed = true;
637
12.0k
    return Status::OK();
638
12.0k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
13.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
13.8k
    if (_closed) {
631
7.00k
        return Status::OK();
632
7.00k
    }
633
6.89k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
6.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
6.89k
    }
636
6.89k
    _closed = true;
637
6.89k
    return Status::OK();
638
13.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
151k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
151k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
151k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
151k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
151k
    }
636
151k
    _closed = true;
637
151k
    return Status::OK();
638
151k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
386
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
386
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
386
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
386
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
386
    }
636
386
    _closed = true;
637
386
    return Status::OK();
638
386
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
219
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
219
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
219
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
219
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
219
    }
636
219
    _closed = true;
637
219
    return Status::OK();
638
219
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
1.22M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
1.22M
    if (_closed) {
631
18.1k
        return Status::OK();
632
18.1k
    }
633
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
    }
636
1.20M
    _closed = true;
637
1.20M
    return Status::OK();
638
1.22M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
54.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
54.8k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
54.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
54.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
54.8k
    }
636
54.8k
    _closed = true;
637
54.8k
    return Status::OK();
638
54.8k
}
_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
15.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
15.6k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
15.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
15.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
15.6k
    }
636
15.6k
    _closed = true;
637
15.6k
    return Status::OK();
638
15.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
581
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
581
    if (_closed) {
631
290
        return Status::OK();
632
290
    }
633
291
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
291
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
291
    }
636
291
    _closed = true;
637
291
    return Status::OK();
638
581
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
10.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
10.0k
    if (_closed) {
631
5.09k
        return Status::OK();
632
5.09k
    }
633
4.92k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
4.92k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
4.92k
    }
636
4.92k
    _closed = true;
637
4.92k
    return Status::OK();
638
10.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
729k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
729k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
729k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
729k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
729k
    }
636
729k
    _closed = true;
637
729k
    return Status::OK();
638
729k
}
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.01M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
2.01M
    _operator_profile =
644
2.01M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
2.01M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
2.01M
    _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.01M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
2.01M
    _operator_profile->add_child(_common_profile, true);
653
2.01M
    _operator_profile->add_child(_custom_profile, true);
654
655
2.01M
    _operator_profile->set_metadata(_parent->node_id());
656
2.01M
    _wait_for_finish_dependency_timer =
657
2.01M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
2.01M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
2.01M
    if constexpr (!is_fake_shared) {
660
1.33M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
1.33M
            info.shared_state_map.end()) {
662
288k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
269k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
269k
            }
665
288k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
288k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
288k
                                                  ? 0
668
288k
                                                  : info.task_idx]
669
288k
                                  .get();
670
288k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
1.04M
        } else {
672
1.04M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
155
                DCHECK(false);
674
155
            }
675
1.04M
            _shared_state = info.shared_state->template cast<SharedState>();
676
1.04M
            _dependency = _shared_state->create_sink_dependency(
677
1.04M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
1.04M
        }
679
1.33M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
1.33M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
1.33M
    }
682
683
2.01M
    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.01M
    _rows_input_counter =
688
2.01M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
2.01M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
2.01M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
2.01M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
2.01M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
2.01M
    _memory_used_counter =
694
2.01M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
2.01M
    _common_profile->add_info_string("IsColocate",
696
2.01M
                                     std::to_string(_parent->is_colocated_operator()));
697
2.01M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
2.01M
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
2.01M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
2.01M
    return Status::OK();
701
2.01M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
118k
    _operator_profile =
644
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
118k
    _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
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
118k
    _operator_profile->add_child(_common_profile, true);
653
118k
    _operator_profile->add_child(_custom_profile, true);
654
655
118k
    _operator_profile->set_metadata(_parent->node_id());
656
118k
    _wait_for_finish_dependency_timer =
657
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
118k
    if constexpr (!is_fake_shared) {
660
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
118k
            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
18.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
18.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
18.7k
                                                  ? 0
668
18.7k
                                                  : info.task_idx]
669
18.7k
                                  .get();
670
18.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
100k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
100k
            _shared_state = info.shared_state->template cast<SharedState>();
676
100k
            _dependency = _shared_state->create_sink_dependency(
677
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
100k
        }
679
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
118k
    }
682
683
118k
    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
118k
    _rows_input_counter =
688
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
118k
    _memory_used_counter =
694
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
118k
    _common_profile->add_info_string("IsColocate",
696
118k
                                     std::to_string(_parent->is_colocated_operator()));
697
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
118k
    return Status::OK();
701
118k
}
_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
254k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
254k
    _operator_profile =
644
254k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
254k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
254k
    _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
254k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
254k
    _operator_profile->add_child(_common_profile, true);
653
254k
    _operator_profile->add_child(_custom_profile, true);
654
655
254k
    _operator_profile->set_metadata(_parent->node_id());
656
254k
    _wait_for_finish_dependency_timer =
657
254k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
254k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
254k
    if constexpr (!is_fake_shared) {
660
254k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
254k
            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
254k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
254k
            _shared_state = info.shared_state->template cast<SharedState>();
676
254k
            _dependency = _shared_state->create_sink_dependency(
677
254k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
254k
        }
679
254k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
254k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
254k
    }
682
683
254k
    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
254k
    _rows_input_counter =
688
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
254k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
254k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
254k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
254k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
254k
    _memory_used_counter =
694
254k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
254k
    _common_profile->add_info_string("IsColocate",
696
254k
                                     std::to_string(_parent->is_colocated_operator()));
697
254k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
254k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
254k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
254k
    return Status::OK();
701
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
31
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
31
    _operator_profile =
644
31
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
31
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
31
    _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
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
31
    _operator_profile->add_child(_common_profile, true);
653
31
    _operator_profile->add_child(_custom_profile, true);
654
655
31
    _operator_profile->set_metadata(_parent->node_id());
656
31
    _wait_for_finish_dependency_timer =
657
31
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
31
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
31
    if constexpr (!is_fake_shared) {
660
31
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
31
            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
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
31
            _shared_state = info.shared_state->template cast<SharedState>();
676
31
            _dependency = _shared_state->create_sink_dependency(
677
31
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
31
        }
679
31
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
31
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
31
    }
682
683
31
    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
    _rows_input_counter =
688
31
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
31
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
31
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
31
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
31
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
31
    _memory_used_counter =
694
31
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
31
    _common_profile->add_info_string("IsColocate",
696
31
                                     std::to_string(_parent->is_colocated_operator()));
697
31
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
31
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
31
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
31
    return Status::OK();
701
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
12.0k
    _operator_profile =
644
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
12.0k
    _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.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
12.0k
    _operator_profile->add_child(_common_profile, true);
653
12.0k
    _operator_profile->add_child(_custom_profile, true);
654
655
12.0k
    _operator_profile->set_metadata(_parent->node_id());
656
12.0k
    _wait_for_finish_dependency_timer =
657
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
12.0k
    if constexpr (!is_fake_shared) {
660
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
12.0k
            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.0k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
676
12.0k
            _dependency = _shared_state->create_sink_dependency(
677
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
12.0k
        }
679
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
12.0k
    }
682
683
12.0k
    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.0k
    _rows_input_counter =
688
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
12.0k
    _memory_used_counter =
694
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
12.0k
    _common_profile->add_info_string("IsColocate",
696
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
697
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
12.0k
    return Status::OK();
701
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
6.88k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
6.88k
    _operator_profile =
644
6.88k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
6.88k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
6.88k
    _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.88k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
6.88k
    _operator_profile->add_child(_common_profile, true);
653
6.88k
    _operator_profile->add_child(_custom_profile, true);
654
655
6.88k
    _operator_profile->set_metadata(_parent->node_id());
656
6.88k
    _wait_for_finish_dependency_timer =
657
6.88k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
6.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
6.88k
    if constexpr (!is_fake_shared) {
660
6.88k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
6.88k
            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.88k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
6.88k
            _shared_state = info.shared_state->template cast<SharedState>();
676
6.88k
            _dependency = _shared_state->create_sink_dependency(
677
6.88k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
6.88k
        }
679
6.88k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
6.88k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
6.88k
    }
682
683
6.88k
    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.88k
    _rows_input_counter =
688
6.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
6.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
6.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
6.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
6.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
6.88k
    _memory_used_counter =
694
6.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
6.88k
    _common_profile->add_info_string("IsColocate",
696
6.88k
                                     std::to_string(_parent->is_colocated_operator()));
697
6.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
6.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
6.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
6.88k
    return Status::OK();
701
6.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
151k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
151k
    _operator_profile =
644
151k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
151k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
151k
    _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
151k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
151k
    _operator_profile->add_child(_common_profile, true);
653
151k
    _operator_profile->add_child(_custom_profile, true);
654
655
151k
    _operator_profile->set_metadata(_parent->node_id());
656
151k
    _wait_for_finish_dependency_timer =
657
151k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
151k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
151k
    if constexpr (!is_fake_shared) {
660
151k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
151k
            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
151k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
151k
            _shared_state = info.shared_state->template cast<SharedState>();
676
151k
            _dependency = _shared_state->create_sink_dependency(
677
151k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
151k
        }
679
151k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
151k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
151k
    }
682
683
151k
    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
151k
    _rows_input_counter =
688
151k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
151k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
151k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
151k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
151k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
151k
    _memory_used_counter =
694
151k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
151k
    _common_profile->add_info_string("IsColocate",
696
151k
                                     std::to_string(_parent->is_colocated_operator()));
697
151k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
151k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
151k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
151k
    return Status::OK();
701
151k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
296
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
296
    _operator_profile =
644
296
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
296
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
296
    _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
296
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
296
    _operator_profile->add_child(_common_profile, true);
653
296
    _operator_profile->add_child(_custom_profile, true);
654
655
296
    _operator_profile->set_metadata(_parent->node_id());
656
296
    _wait_for_finish_dependency_timer =
657
296
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
296
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
296
    if constexpr (!is_fake_shared) {
660
296
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
296
            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
296
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
296
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
296
                                                  ? 0
668
296
                                                  : info.task_idx]
669
296
                                  .get();
670
296
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
296
        } 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
296
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
296
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
296
    }
682
683
296
    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
296
    _rows_input_counter =
688
296
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
296
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
296
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
296
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
296
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
296
    _memory_used_counter =
694
296
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
296
    _common_profile->add_info_string("IsColocate",
696
296
                                     std::to_string(_parent->is_colocated_operator()));
697
296
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
296
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
296
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
296
    return Status::OK();
701
296
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
230
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
230
    _operator_profile =
644
230
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
230
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
230
    _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
230
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
230
    _operator_profile->add_child(_common_profile, true);
653
230
    _operator_profile->add_child(_custom_profile, true);
654
655
230
    _operator_profile->set_metadata(_parent->node_id());
656
230
    _wait_for_finish_dependency_timer =
657
230
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
230
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
230
    if constexpr (!is_fake_shared) {
660
230
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
230
            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
230
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
230
            _shared_state = info.shared_state->template cast<SharedState>();
676
230
            _dependency = _shared_state->create_sink_dependency(
677
230
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
230
        }
679
230
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
230
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
230
    }
682
683
230
    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
230
    _rows_input_counter =
688
230
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
230
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
230
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
230
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
230
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
230
    _memory_used_counter =
694
230
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
230
    _common_profile->add_info_string("IsColocate",
696
230
                                     std::to_string(_parent->is_colocated_operator()));
697
230
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
230
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
230
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
230
    return Status::OK();
701
230
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
682k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
682k
    _operator_profile =
644
682k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
682k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
682k
    _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
682k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
682k
    _operator_profile->add_child(_common_profile, true);
653
682k
    _operator_profile->add_child(_custom_profile, true);
654
655
682k
    _operator_profile->set_metadata(_parent->node_id());
656
682k
    _wait_for_finish_dependency_timer =
657
682k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
682k
    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
682k
    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
682k
    _rows_input_counter =
688
682k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
682k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
682k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
682k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
682k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
682k
    _memory_used_counter =
694
682k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
682k
    _common_profile->add_info_string("IsColocate",
696
682k
                                     std::to_string(_parent->is_colocated_operator()));
697
682k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
682k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
682k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
682k
    return Status::OK();
701
682k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
5.80k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
5.80k
    _operator_profile =
644
5.80k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
5.80k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
5.80k
    _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
5.80k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
5.80k
    _operator_profile->add_child(_common_profile, true);
653
5.80k
    _operator_profile->add_child(_custom_profile, true);
654
655
5.80k
    _operator_profile->set_metadata(_parent->node_id());
656
5.80k
    _wait_for_finish_dependency_timer =
657
5.80k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
5.80k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
5.80k
    if constexpr (!is_fake_shared) {
660
5.80k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
5.80k
            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
5.80k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
5.80k
            _shared_state = info.shared_state->template cast<SharedState>();
676
5.80k
            _dependency = _shared_state->create_sink_dependency(
677
5.80k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
5.80k
        }
679
5.80k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
5.80k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
5.80k
    }
682
683
5.80k
    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
5.80k
    _rows_input_counter =
688
5.80k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
5.80k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
5.80k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
5.80k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
5.80k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
5.80k
    _memory_used_counter =
694
5.80k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
5.80k
    _common_profile->add_info_string("IsColocate",
696
5.80k
                                     std::to_string(_parent->is_colocated_operator()));
697
5.80k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
5.80k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
5.80k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
5.80k
    return Status::OK();
701
5.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
393
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
393
    _operator_profile =
644
393
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
393
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
393
    _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
393
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
393
    _operator_profile->add_child(_common_profile, true);
653
393
    _operator_profile->add_child(_custom_profile, true);
654
655
393
    _operator_profile->set_metadata(_parent->node_id());
656
393
    _wait_for_finish_dependency_timer =
657
393
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
393
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
393
    if constexpr (!is_fake_shared) {
660
393
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
393
            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
393
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
393
            _shared_state = info.shared_state->template cast<SharedState>();
676
393
            _dependency = _shared_state->create_sink_dependency(
677
393
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
393
        }
679
393
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
393
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
393
    }
682
683
393
    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
393
    _rows_input_counter =
688
393
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
393
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
393
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
393
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
393
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
393
    _memory_used_counter =
694
393
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
393
    _common_profile->add_info_string("IsColocate",
696
393
                                     std::to_string(_parent->is_colocated_operator()));
697
393
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
393
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
393
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
393
    return Status::OK();
701
393
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
5.66k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
5.66k
    _operator_profile =
644
5.66k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
5.66k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
5.66k
    _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
5.66k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
5.66k
    _operator_profile->add_child(_common_profile, true);
653
5.66k
    _operator_profile->add_child(_custom_profile, true);
654
655
5.66k
    _operator_profile->set_metadata(_parent->node_id());
656
5.66k
    _wait_for_finish_dependency_timer =
657
5.66k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
5.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
5.66k
    if constexpr (!is_fake_shared) {
660
5.66k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
5.66k
            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
5.66k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
5.66k
            _shared_state = info.shared_state->template cast<SharedState>();
676
5.66k
            _dependency = _shared_state->create_sink_dependency(
677
5.66k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
5.66k
        }
679
5.66k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
5.66k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
5.66k
    }
682
683
5.66k
    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
5.66k
    _rows_input_counter =
688
5.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
5.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
5.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
5.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
5.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
5.66k
    _memory_used_counter =
694
5.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
5.66k
    _common_profile->add_info_string("IsColocate",
696
5.66k
                                     std::to_string(_parent->is_colocated_operator()));
697
5.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
5.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
5.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
5.66k
    return Status::OK();
701
5.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
12.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
12.1k
    _operator_profile =
644
12.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
12.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
12.1k
    _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.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
12.1k
    _operator_profile->add_child(_common_profile, true);
653
12.1k
    _operator_profile->add_child(_custom_profile, true);
654
655
12.1k
    _operator_profile->set_metadata(_parent->node_id());
656
12.1k
    _wait_for_finish_dependency_timer =
657
12.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
12.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
12.1k
    if constexpr (!is_fake_shared) {
660
12.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
12.1k
            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.1k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
12.1k
            _shared_state = info.shared_state->template cast<SharedState>();
676
12.1k
            _dependency = _shared_state->create_sink_dependency(
677
12.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
12.1k
        }
679
12.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
12.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
12.1k
    }
682
683
12.1k
    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.1k
    _rows_input_counter =
688
12.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
12.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
12.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
12.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
12.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
12.1k
    _memory_used_counter =
694
12.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
12.1k
    _common_profile->add_info_string("IsColocate",
696
12.1k
                                     std::to_string(_parent->is_colocated_operator()));
697
12.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
12.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
12.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
12.1k
    return Status::OK();
701
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
269k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
269k
    _operator_profile =
644
269k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
269k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
269k
    _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
269k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
269k
    _operator_profile->add_child(_common_profile, true);
653
269k
    _operator_profile->add_child(_custom_profile, true);
654
655
269k
    _operator_profile->set_metadata(_parent->node_id());
656
269k
    _wait_for_finish_dependency_timer =
657
269k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
269k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
269k
    if constexpr (!is_fake_shared) {
660
269k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
269k
            info.shared_state_map.end()) {
662
269k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
269k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
269k
            }
665
269k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
269k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
269k
                                                  ? 0
668
269k
                                                  : info.task_idx]
669
269k
                                  .get();
670
269k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
269k
        } else {
672
155
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
155
                DCHECK(false);
674
155
            }
675
155
            _shared_state = info.shared_state->template cast<SharedState>();
676
155
            _dependency = _shared_state->create_sink_dependency(
677
155
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
155
        }
679
269k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
269k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
269k
    }
682
683
269k
    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
269k
    _rows_input_counter =
688
269k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
269k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
269k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
269k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
269k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
269k
    _memory_used_counter =
694
269k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
269k
    _common_profile->add_info_string("IsColocate",
696
269k
                                     std::to_string(_parent->is_colocated_operator()));
697
269k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
269k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
269k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
269k
    return Status::OK();
701
269k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
492k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
492k
    _operator_profile =
644
492k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
492k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
492k
    _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
492k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
492k
    _operator_profile->add_child(_common_profile, true);
653
492k
    _operator_profile->add_child(_custom_profile, true);
654
655
492k
    _operator_profile->set_metadata(_parent->node_id());
656
492k
    _wait_for_finish_dependency_timer =
657
492k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
492k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
492k
    if constexpr (!is_fake_shared) {
660
492k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
492k
            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
492k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
492k
            _shared_state = info.shared_state->template cast<SharedState>();
676
492k
            _dependency = _shared_state->create_sink_dependency(
677
492k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
492k
        }
679
492k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
492k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
492k
    }
682
683
492k
    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
492k
    _rows_input_counter =
688
492k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
492k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
492k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
492k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
492k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
492k
    _memory_used_counter =
694
492k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
492k
    _common_profile->add_info_string("IsColocate",
696
492k
                                     std::to_string(_parent->is_colocated_operator()));
697
492k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
492k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
492k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
492k
    return Status::OK();
701
492k
}
_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.01M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
2.01M
    if (_closed) {
706
2
        return Status::OK();
707
2
    }
708
2.01M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
1.33M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
1.33M
    }
711
2.01M
    _closed = true;
712
2.01M
    return Status::OK();
713
2.01M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
118k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
118k
    }
711
118k
    _closed = true;
712
118k
    return Status::OK();
713
118k
}
_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
254k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
254k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
254k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
254k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
254k
    }
711
254k
    _closed = true;
712
254k
    return Status::OK();
713
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
23
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
23
    if (_closed) {
706
2
        return Status::OK();
707
2
    }
708
21
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
21
    }
711
21
    _closed = true;
712
21
    return Status::OK();
713
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
12.0k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
12.0k
    }
711
12.0k
    _closed = true;
712
12.0k
    return Status::OK();
713
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
6.88k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
6.88k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
6.88k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
6.88k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
6.88k
    }
711
6.88k
    _closed = true;
712
6.88k
    return Status::OK();
713
6.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
151k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
151k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
151k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
151k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
151k
    }
711
151k
    _closed = true;
712
151k
    return Status::OK();
713
151k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
297
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
297
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
297
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
297
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
297
    }
711
297
    _closed = true;
712
297
    return Status::OK();
713
297
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
219
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
219
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
219
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
219
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
219
    }
711
219
    _closed = true;
712
219
    return Status::OK();
713
219
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
681k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
681k
    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
681k
    _closed = true;
712
681k
    return Status::OK();
713
681k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
5.79k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
5.79k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
5.79k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
5.79k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
5.79k
    }
711
5.79k
    _closed = true;
712
5.79k
    return Status::OK();
713
5.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
290
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
290
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
290
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
290
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
290
    }
711
290
    _closed = true;
712
290
    return Status::OK();
713
290
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
5.65k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
5.65k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
5.65k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
5.65k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
5.65k
    }
711
5.65k
    _closed = true;
712
5.65k
    return Status::OK();
713
5.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
12.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
12.1k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
12.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
12.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
12.1k
    }
711
12.1k
    _closed = true;
712
12.1k
    return Status::OK();
713
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
269k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
269k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
269k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
269k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
269k
    }
711
269k
    _closed = true;
712
269k
    return Status::OK();
713
269k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
494k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
494k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
494k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
494k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
494k
    }
711
494k
    _closed = true;
712
494k
    return Status::OK();
713
494k
}
_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
17.9k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
17.9k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
17.8k
    return pull(state, block, eos);
719
17.9k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
431
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
431
    return pull(state, block, eos);
719
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
17.4k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
17.4k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
17.4k
    return pull(state, block, eos);
719
17.4k
}
720
721
template <typename LocalStateType>
722
745k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
745k
    auto& local_state = get_local_state(state);
724
745k
    if (need_more_input_data(state)) {
725
717k
        local_state._child_block->clear_column_data(
726
717k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
717k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
717k
                state, local_state._child_block.get(), &local_state._child_eos));
729
717k
        *eos = local_state._child_eos;
730
717k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
85.0k
            return Status::OK();
732
85.0k
        }
733
632k
        {
734
632k
            SCOPED_TIMER(local_state.exec_time_counter());
735
632k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
632k
        }
737
632k
    }
738
739
660k
    if (!need_more_input_data(state)) {
740
603k
        SCOPED_TIMER(local_state.exec_time_counter());
741
603k
        bool new_eos = false;
742
603k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
603k
        if (new_eos) {
744
529k
            *eos = true;
745
529k
        } else if (!need_more_input_data(state)) {
746
22.3k
            *eos = false;
747
22.3k
        }
748
603k
    }
749
660k
    return Status::OK();
750
660k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
131k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
131k
    auto& local_state = get_local_state(state);
724
131k
    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.9k
            return Status::OK();
732
34.9k
        }
733
80.6k
        {
734
80.6k
            SCOPED_TIMER(local_state.exec_time_counter());
735
80.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
80.6k
        }
737
80.6k
    }
738
739
96.6k
    if (!need_more_input_data(state)) {
740
96.6k
        SCOPED_TIMER(local_state.exec_time_counter());
741
96.6k
        bool new_eos = false;
742
96.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
96.6k
        if (new_eos) {
744
46.2k
            *eos = true;
745
50.3k
        } else if (!need_more_input_data(state)) {
746
8.70k
            *eos = false;
747
8.70k
        }
748
96.6k
    }
749
96.6k
    return Status::OK();
750
96.6k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
3.19k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
3.19k
    auto& local_state = get_local_state(state);
724
3.19k
    if (need_more_input_data(state)) {
725
1.86k
        local_state._child_block->clear_column_data(
726
1.86k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
1.86k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
1.86k
                state, local_state._child_block.get(), &local_state._child_eos));
729
1.86k
        *eos = local_state._child_eos;
730
1.86k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
336
            return Status::OK();
732
336
        }
733
1.52k
        {
734
1.52k
            SCOPED_TIMER(local_state.exec_time_counter());
735
1.52k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
1.52k
        }
737
1.52k
    }
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.13k
            *eos = true;
745
1.71k
        } else if (!need_more_input_data(state)) {
746
1.33k
            *eos = false;
747
1.33k
        }
748
2.85k
    }
749
2.85k
    return Status::OK();
750
2.85k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
4.51k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
4.51k
    auto& local_state = get_local_state(state);
724
4.51k
    if (need_more_input_data(state)) {
725
4.51k
        local_state._child_block->clear_column_data(
726
4.51k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
4.51k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
4.51k
                state, local_state._child_block.get(), &local_state._child_eos));
729
4.51k
        *eos = local_state._child_eos;
730
4.51k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
1.56k
            return Status::OK();
732
1.56k
        }
733
2.94k
        {
734
2.94k
            SCOPED_TIMER(local_state.exec_time_counter());
735
2.94k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
2.94k
        }
737
2.94k
    }
738
739
2.94k
    if (!need_more_input_data(state)) {
740
2.94k
        SCOPED_TIMER(local_state.exec_time_counter());
741
2.94k
        bool new_eos = false;
742
2.94k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
2.94k
        if (new_eos) {
744
1.60k
            *eos = true;
745
1.60k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
2.94k
    }
749
2.94k
    return Status::OK();
750
2.94k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
43.9k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
43.9k
    auto& local_state = get_local_state(state);
724
43.9k
    if (need_more_input_data(state)) {
725
43.9k
        local_state._child_block->clear_column_data(
726
43.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
43.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
43.9k
                state, local_state._child_block.get(), &local_state._child_eos));
729
43.9k
        *eos = local_state._child_eos;
730
43.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
5.18k
            return Status::OK();
732
5.18k
        }
733
38.7k
        {
734
38.7k
            SCOPED_TIMER(local_state.exec_time_counter());
735
38.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
38.7k
        }
737
38.7k
    }
738
739
38.8k
    if (!need_more_input_data(state)) {
740
14.9k
        SCOPED_TIMER(local_state.exec_time_counter());
741
14.9k
        bool new_eos = false;
742
14.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
14.9k
        if (new_eos) {
744
14.7k
            *eos = true;
745
14.7k
        } else if (!need_more_input_data(state)) {
746
55
            *eos = false;
747
55
        }
748
14.9k
    }
749
38.8k
    return Status::OK();
750
38.8k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
523k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
523k
    auto& local_state = get_local_state(state);
724
524k
    if (need_more_input_data(state)) {
725
524k
        local_state._child_block->clear_column_data(
726
524k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
524k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
524k
                state, local_state._child_block.get(), &local_state._child_eos));
729
524k
        *eos = local_state._child_eos;
730
524k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
39.1k
            return Status::OK();
732
39.1k
        }
733
485k
        {
734
485k
            SCOPED_TIMER(local_state.exec_time_counter());
735
485k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
485k
        }
737
485k
    }
738
739
484k
    if (!need_more_input_data(state)) {
740
451k
        SCOPED_TIMER(local_state.exec_time_counter());
741
451k
        bool new_eos = false;
742
451k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
451k
        if (new_eos) {
744
450k
            *eos = true;
745
450k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
451k
    }
749
484k
    return Status::OK();
750
484k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
32.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
32.7k
    auto& local_state = get_local_state(state);
724
32.7k
    if (need_more_input_data(state)) {
725
20.8k
        local_state._child_block->clear_column_data(
726
20.8k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
20.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
20.8k
                state, local_state._child_block.get(), &local_state._child_eos));
729
20.8k
        *eos = local_state._child_eos;
730
20.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
3.23k
            return Status::OK();
732
3.23k
        }
733
17.6k
        {
734
17.6k
            SCOPED_TIMER(local_state.exec_time_counter());
735
17.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
17.6k
        }
737
17.6k
    }
738
739
29.4k
    if (!need_more_input_data(state)) {
740
28.9k
        SCOPED_TIMER(local_state.exec_time_counter());
741
28.9k
        bool new_eos = false;
742
28.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
28.9k
        if (new_eos) {
744
12.0k
            *eos = true;
745
16.9k
        } else if (!need_more_input_data(state)) {
746
11.8k
            *eos = false;
747
11.8k
        }
748
28.9k
    }
749
29.4k
    return Status::OK();
750
29.4k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
6.17k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
6.17k
    auto& local_state = get_local_state(state);
724
6.17k
    if (need_more_input_data(state)) {
725
5.81k
        local_state._child_block->clear_column_data(
726
5.81k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
5.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
5.81k
                state, local_state._child_block.get(), &local_state._child_eos));
729
5.81k
        *eos = local_state._child_eos;
730
5.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
612
            return Status::OK();
732
612
        }
733
5.20k
        {
734
5.20k
            SCOPED_TIMER(local_state.exec_time_counter());
735
5.20k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
5.20k
        }
737
5.20k
    }
738
739
5.55k
    if (!need_more_input_data(state)) {
740
5.55k
        SCOPED_TIMER(local_state.exec_time_counter());
741
5.55k
        bool new_eos = false;
742
5.55k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
5.55k
        if (new_eos) {
744
3.48k
            *eos = true;
745
3.48k
        } else if (!need_more_input_data(state)) {
746
366
            *eos = false;
747
366
        }
748
5.55k
    }
749
5.55k
    return Status::OK();
750
5.55k
}
751
752
template <typename Writer, typename Parent>
753
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
754
62.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
62.6k
    RETURN_IF_ERROR(Base::init(state, info));
756
62.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
62.6k
                                                         "AsyncWriterDependency", true);
758
62.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
62.6k
                             _finish_dependency));
760
761
62.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
62.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
62.6k
    return Status::OK();
764
62.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
524
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
524
    RETURN_IF_ERROR(Base::init(state, info));
756
524
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
524
                                                         "AsyncWriterDependency", true);
758
524
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
524
                             _finish_dependency));
760
761
524
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
524
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
524
    return Status::OK();
764
524
}
_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
43.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
43.6k
    RETURN_IF_ERROR(Base::init(state, info));
756
43.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
43.6k
                                                         "AsyncWriterDependency", true);
758
43.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
43.6k
                             _finish_dependency));
760
761
43.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
43.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
43.6k
    return Status::OK();
764
43.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
8.85k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
8.85k
    RETURN_IF_ERROR(Base::init(state, info));
756
8.85k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
8.85k
                                                         "AsyncWriterDependency", true);
758
8.85k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
8.85k
                             _finish_dependency));
760
761
8.85k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
8.85k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
8.85k
    return Status::OK();
764
8.85k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
5.15k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
5.15k
    RETURN_IF_ERROR(Base::init(state, info));
756
5.15k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
5.15k
                                                         "AsyncWriterDependency", true);
758
5.15k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
5.15k
                             _finish_dependency));
760
761
5.15k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
5.15k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
5.15k
    return Status::OK();
764
5.15k
}
_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
62.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
62.6k
    RETURN_IF_ERROR(Base::open(state));
770
62.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
572k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
510k
        RETURN_IF_ERROR(
773
510k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
510k
    }
775
62.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
62.6k
    return Status::OK();
777
62.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
524
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
524
    RETURN_IF_ERROR(Base::open(state));
770
524
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
2.80k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
2.27k
        RETURN_IF_ERROR(
773
2.27k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
2.27k
    }
775
524
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
524
    return Status::OK();
777
524
}
_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.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
43.7k
    RETURN_IF_ERROR(Base::open(state));
770
43.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
333k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
289k
        RETURN_IF_ERROR(
773
289k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
289k
    }
775
43.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
43.7k
    return Status::OK();
777
43.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
8.82k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
8.82k
    RETURN_IF_ERROR(Base::open(state));
770
8.82k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
54.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
45.2k
        RETURN_IF_ERROR(
773
45.2k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
45.2k
    }
775
8.82k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
8.82k
    return Status::OK();
777
8.82k
}
_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
134k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
129k
        RETURN_IF_ERROR(
773
129k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
129k
    }
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.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
38.7k
        RETURN_IF_ERROR(
773
38.7k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
38.7k
    }
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
638
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
638
    RETURN_IF_ERROR(Base::open(state));
770
638
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
4.36k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
3.72k
        RETURN_IF_ERROR(
773
3.72k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
3.72k
    }
775
638
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
638
    return Status::OK();
777
638
}
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
85.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
85.3k
    return _writer->sink(block, eos);
783
85.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
2.30k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
2.30k
    return _writer->sink(block, eos);
783
2.30k
}
_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
58.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
58.5k
    return _writer->sink(block, eos);
783
58.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
10.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
10.2k
    return _writer->sink(block, eos);
783
10.2k
}
_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
796
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
796
    return _writer->sink(block, eos);
783
796
}
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
62.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
62.7k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
62.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
62.7k
    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
62.7k
    if (_writer) {
795
62.7k
        Status st = _writer->get_writer_status();
796
62.7k
        if (exec_status.ok()) {
797
62.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
62.6k
                                                       : Status::Cancelled("force close"));
799
62.6k
        } else {
800
132
            _writer->force_close(exec_status);
801
132
        }
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
62.7k
        RETURN_IF_ERROR(st);
806
62.7k
    }
807
62.7k
    return Base::close(state, exec_status);
808
62.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
512
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
512
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
512
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
512
    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
512
    if (_writer) {
795
512
        Status st = _writer->get_writer_status();
796
512
        if (exec_status.ok()) {
797
512
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
512
                                                       : Status::Cancelled("force close"));
799
512
        } 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
512
        RETURN_IF_ERROR(st);
806
512
    }
807
512
    return Base::close(state, exec_status);
808
512
}
_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.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
43.8k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
43.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
43.8k
    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.8k
    if (_writer) {
795
43.8k
        Status st = _writer->get_writer_status();
796
43.8k
        if (exec_status.ok()) {
797
43.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
43.7k
                                                       : Status::Cancelled("force close"));
799
43.7k
        } 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.8k
        RETURN_IF_ERROR(st);
806
43.8k
    }
807
43.7k
    return Base::close(state, exec_status);
808
43.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
8.85k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
8.85k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
8.85k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
8.85k
    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.85k
    if (_writer) {
795
8.85k
        Status st = _writer->get_writer_status();
796
8.85k
        if (exec_status.ok()) {
797
8.77k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
8.77k
                                                       : Status::Cancelled("force close"));
799
8.77k
        } else {
800
82
            _writer->force_close(exec_status);
801
82
        }
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.85k
        RETURN_IF_ERROR(st);
806
8.85k
    }
807
8.85k
    return Base::close(state, exec_status);
808
8.85k
}
_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
3.38k
        } else {
800
2
            _writer->force_close(exec_status);
801
2
        }
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
638
        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
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
638
        RETURN_IF_ERROR(st);
806
638
    }
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