Coverage Report

Created: 2026-06-19 19:35

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.15M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.15M
    if (_parent->nereids_id() == -1) {
120
1.14M
        return fmt::format("(id={})", _parent->node_id());
121
1.14M
    } else {
122
1.00M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.00M
    }
124
2.15M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
66.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
66.6k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
66.6k
    } else {
122
66.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
66.6k
    }
124
66.6k
}
_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
247k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
247k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
247k
    } else {
122
247k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
247k
    }
124
247k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
35
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
35
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
35
    } else {
122
35
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
35
    }
124
35
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
8.95k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
8.95k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
8.95k
    } else {
122
8.95k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8.95k
    }
124
8.95k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.73k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.73k
    if (_parent->nereids_id() == -1) {
120
11
        return fmt::format("(id={})", _parent->node_id());
121
6.72k
    } else {
122
6.72k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.72k
    }
124
6.73k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
148k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
148k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
148k
    } else {
122
148k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
148k
    }
124
148k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
591
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
591
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
591
    } else {
122
591
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
591
    }
124
591
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
152
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
152
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
152
    } else {
122
152
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
152
    }
124
152
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
827k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
827k
    if (_parent->nereids_id() == -1) {
120
363k
        return fmt::format("(id={})", _parent->node_id());
121
464k
    } else {
122
464k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
464k
    }
124
827k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.8k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.8k
    } else {
122
54.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.8k
    }
124
54.8k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
17
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
17
    if (_parent->nereids_id() == -1) {
120
17
        return fmt::format("(id={})", _parent->node_id());
121
17
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
17
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.3k
    if (_parent->nereids_id() == -1) {
120
10.3k
        return fmt::format("(id={})", _parent->node_id());
121
10.3k
    } else {
122
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
5
    }
124
10.3k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
451
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
451
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
349
    } else {
122
349
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
349
    }
124
451
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.49k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.49k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.48k
    } else {
122
4.48k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.48k
    }
124
4.49k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
773k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
773k
    if (_parent->nereids_id() == -1) {
120
773k
        return fmt::format("(id={})", _parent->node_id());
121
773k
    } else {
122
11
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
11
    }
124
773k
}
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.36M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.36M
    if (_parent->nereids_id() == -1) {
129
829k
        return fmt::format("(id={})", _parent->node_id());
130
829k
    } else {
131
536k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
536k
    }
133
1.36M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
114k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
114k
    } else {
131
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
114k
    }
133
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
2
    if (_parent->nereids_id() == -1) {
129
1
        return fmt::format("(id={})", _parent->node_id());
130
1
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
250k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
250k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
250k
    } else {
131
250k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
250k
    }
133
250k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
42
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
42
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
42
    } else {
131
42
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
42
    }
133
42
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
8.97k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
8.97k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
8.97k
    } else {
131
8.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
8.97k
    }
133
8.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.74k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.74k
    if (_parent->nereids_id() == -1) {
129
11
        return fmt::format("(id={})", _parent->node_id());
130
6.73k
    } else {
131
6.73k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.73k
    }
133
6.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
149k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
149k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
149k
    } else {
131
149k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
149k
    }
133
149k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
511
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
511
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
511
    } else {
131
511
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
511
    }
133
511
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
162
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
162
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
162
    } else {
131
162
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
162
    }
133
162
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
99
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
99
    if (_parent->nereids_id() == -1) {
129
97
        return fmt::format("(id={})", _parent->node_id());
130
97
    } else {
131
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
2
    }
133
99
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.18k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.18k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.18k
    } else {
131
5.18k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.18k
    }
133
5.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
456
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
456
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
354
    } else {
131
354
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
354
    }
133
456
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.0k
    if (_parent->nereids_id() == -1) {
129
12.0k
        return fmt::format("(id={})", _parent->node_id());
130
12.0k
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
320k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
321k
    if (_parent->nereids_id() == -1) {
129
321k
        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
320k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
495k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
495k
    if (_parent->nereids_id() == -1) {
129
495k
        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
495k
}
_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
301
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
301
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
301
    } else {
131
301
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
301
    }
133
301
}
134
135
template <typename SharedStateArg>
136
29.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
29.1k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
29.1k
    _terminated = true;
141
29.1k
    return Status::OK();
142
29.1k
}
_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
974
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
974
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
974
    _terminated = true;
141
974
    return Status::OK();
142
974
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
6
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
6
    _terminated = true;
141
6
    return Status::OK();
142
6
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
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
2.48k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.48k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.48k
    _terminated = true;
141
2.48k
    return Status::OK();
142
2.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
869
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
869
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
869
    _terminated = true;
141
869
    return Status::OK();
142
869
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
451
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
451
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
451
    _terminated = true;
141
451
    return Status::OK();
142
451
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
195
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
195
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
195
    _terminated = true;
141
195
    return Status::OK();
142
195
}
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
776k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
776k
    return _child && _child->is_serial_operator() && !is_source()
146
776k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
776k
                   : DataDistribution(ExchangeType::NOOP);
148
776k
}
149
150
14.0k
bool OperatorBase::is_hash_shuffle(ExchangeType exchange_type) {
151
14.0k
    return exchange_type == ExchangeType::HASH_SHUFFLE ||
152
14.0k
           exchange_type == ExchangeType::BUCKET_HASH_SHUFFLE;
153
14.0k
}
154
155
75.7k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
75.7k
    if (!_child) {
157
25.6k
        return false;
158
25.6k
    }
159
50.1k
    if (_child->is_serial_operator()) {
160
34.9k
        return true;
161
34.9k
    }
162
15.1k
    const auto child_distribution = _child->required_data_distribution(state);
163
15.1k
    return child_distribution.need_local_exchange() &&
164
15.1k
           !is_hash_shuffle(child_distribution.distribution_type);
165
50.1k
}
166
167
81.6k
const RowDescriptor& OperatorBase::row_desc() const {
168
81.6k
    return _child->row_desc();
169
81.6k
}
170
171
template <typename SharedStateArg>
172
16.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
16.9k
    fmt::memory_buffer debug_string_buffer;
174
16.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
16.9k
    return fmt::to_string(debug_string_buffer);
176
16.9k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
60
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
60
    fmt::memory_buffer debug_string_buffer;
174
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
60
    return fmt::to_string(debug_string_buffer);
176
60
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
3
    fmt::memory_buffer debug_string_buffer;
174
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
3
    return fmt::to_string(debug_string_buffer);
176
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
26
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
26
    fmt::memory_buffer debug_string_buffer;
174
26
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
26
    return fmt::to_string(debug_string_buffer);
176
26
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
23
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
23
    fmt::memory_buffer debug_string_buffer;
174
23
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
23
    return fmt::to_string(debug_string_buffer);
176
23
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
40
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
40
    fmt::memory_buffer debug_string_buffer;
174
40
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
40
    return fmt::to_string(debug_string_buffer);
176
40
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
16.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
16.7k
    fmt::memory_buffer debug_string_buffer;
174
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
16.7k
    return fmt::to_string(debug_string_buffer);
176
16.7k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
1
    fmt::memory_buffer debug_string_buffer;
174
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
1
    return fmt::to_string(debug_string_buffer);
176
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
172
109
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
109
    fmt::memory_buffer debug_string_buffer;
174
109
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
109
    return fmt::to_string(debug_string_buffer);
176
109
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
16.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
16.8k
    fmt::memory_buffer debug_string_buffer;
181
16.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
16.8k
    return fmt::to_string(debug_string_buffer);
183
16.8k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
16
    fmt::memory_buffer debug_string_buffer;
181
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
16
    return fmt::to_string(debug_string_buffer);
183
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
26
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
26
    fmt::memory_buffer debug_string_buffer;
181
26
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
26
    return fmt::to_string(debug_string_buffer);
183
26
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
16
    fmt::memory_buffer debug_string_buffer;
181
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
16
    return fmt::to_string(debug_string_buffer);
183
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
40
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
40
    fmt::memory_buffer debug_string_buffer;
181
40
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
40
    return fmt::to_string(debug_string_buffer);
183
40
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
59
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
59
    fmt::memory_buffer debug_string_buffer;
181
59
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
59
    return fmt::to_string(debug_string_buffer);
183
59
}
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
179
68
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
68
    fmt::memory_buffer debug_string_buffer;
181
68
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
68
    return fmt::to_string(debug_string_buffer);
183
68
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
16.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
16.6k
    fmt::memory_buffer debug_string_buffer;
181
16.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
16.6k
    return fmt::to_string(debug_string_buffer);
183
16.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
17.1k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
17.1k
    fmt::memory_buffer debug_string_buffer;
187
17.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
17.1k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
17.1k
                   _is_serial_operator);
190
17.1k
    return fmt::to_string(debug_string_buffer);
191
17.1k
}
192
193
16.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
16.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
16.9k
}
196
197
698k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
698k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
698k
    _nereids_id = tnode.nereids_id;
200
698k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
3.74k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
3.74k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
3.74k
            tnode.intermediate_projections_list.size()) {
206
0
            return Status::InternalError(
207
0
                    "intermediate_output_tuple_id_list size:{} not match "
208
0
                    "intermediate_projections_list size:{}",
209
0
                    tnode.intermediate_output_tuple_id_list.size(),
210
0
                    tnode.intermediate_projections_list.size());
211
0
        }
212
3.74k
    }
213
698k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
698k
    _op_name = substr + "_OPERATOR";
215
216
698k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
698k
    } else if (tnode.__isset.conjuncts) {
219
450k
        for (const auto& conjunct : tnode.conjuncts) {
220
450k
            VExprContextSPtr context;
221
450k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
450k
            _conjuncts.emplace_back(context);
223
450k
        }
224
147k
    }
225
226
    // create the projections expr
227
698k
    if (tnode.__isset.projections) {
228
316k
        DCHECK(tnode.__isset.output_tuple_id);
229
316k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
230
316k
    }
231
698k
    if (!tnode.intermediate_projections_list.empty()) {
232
3.74k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
3.74k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
7.69k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
7.69k
            VExprContextSPtrs projections;
236
7.69k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
7.69k
            _intermediate_projections.push_back(projections);
238
7.69k
        }
239
3.74k
    }
240
698k
    return Status::OK();
241
698k
}
242
243
730k
Status OperatorXBase::prepare(RuntimeState* state) {
244
730k
    for (auto& conjunct : _conjuncts) {
245
450k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
450k
    }
247
730k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
678k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
606k
            return a->execute_cost() < b->execute_cost();
250
606k
        });
251
678k
    };
252
253
738k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
7.69k
        RETURN_IF_ERROR(
255
7.69k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
7.69k
    }
257
730k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
730k
    if (has_output_row_desc()) {
260
316k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
316k
    }
262
263
730k
    for (auto& conjunct : _conjuncts) {
264
450k
        RETURN_IF_ERROR(conjunct->open(state));
265
450k
    }
266
730k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
730k
    for (auto& projections : _intermediate_projections) {
268
7.69k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
7.69k
    }
270
730k
    if (_child && !is_source()) {
271
131k
        RETURN_IF_ERROR(_child->prepare(state));
272
131k
    }
273
274
730k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
730k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
730k
    return Status::OK();
280
730k
}
281
282
6.19k
Status OperatorXBase::terminate(RuntimeState* state) {
283
6.19k
    if (_child && !is_source()) {
284
1.04k
        RETURN_IF_ERROR(_child->terminate(state));
285
1.04k
    }
286
6.19k
    auto result = state->get_local_state_result(operator_id());
287
6.19k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
6.19k
    return result.value()->terminate(state);
291
6.19k
}
292
293
6.02M
Status OperatorXBase::close(RuntimeState* state) {
294
6.02M
    if (_child && !is_source()) {
295
1.06M
        RETURN_IF_ERROR(_child->close(state));
296
1.06M
    }
297
6.02M
    auto result = state->get_local_state_result(operator_id());
298
6.02M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
6.02M
    return result.value()->close(state);
302
6.02M
}
303
304
274k
void PipelineXLocalStateBase::clear_origin_block() {
305
274k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
274k
}
307
308
609k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
609k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
609k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
609k
    return Status::OK();
313
609k
}
314
315
0
bool PipelineXLocalStateBase::is_blockable() const {
316
0
    return std::any_of(_projections.begin(), _projections.end(),
317
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
318
0
}
319
320
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
321
274k
                                     Block* output_block) const {
322
274k
    auto* local_state = state->get_local_state(operator_id());
323
274k
    SCOPED_TIMER(local_state->exec_time_counter());
324
274k
    SCOPED_TIMER(local_state->_projection_timer);
325
274k
    const size_t rows = origin_block->rows();
326
274k
    if (rows == 0) {
327
134k
        return Status::OK();
328
134k
    }
329
139k
    Block input_block = *origin_block;
330
331
139k
    size_t bytes_usage = 0;
332
139k
    ColumnsWithTypeAndName new_columns;
333
139k
    for (const auto& projections : local_state->_intermediate_projections) {
334
1.08k
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
1.08k
        new_columns.resize(projections.size());
339
7.91k
        for (int i = 0; i < projections.size(); i++) {
340
6.83k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
6.83k
            if (new_columns[i].column->size() != rows) {
342
0
                return Status::InternalError(
343
0
                        "intermediate projection result column size {} not equal input rows {}, "
344
0
                        "expr: {}",
345
0
                        new_columns[i].column->size(), rows,
346
0
                        projections[i]->root()->debug_string());
347
0
            }
348
6.83k
        }
349
1.08k
        Block tmp_block {new_columns};
350
1.08k
        bytes_usage += tmp_block.allocated_bytes();
351
1.08k
        input_block.swap(tmp_block);
352
1.08k
    }
353
354
139k
    if (input_block.rows() != rows) {
355
0
        return Status::InternalError(
356
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
357
0
                "input_block: {}",
358
0
                input_block.rows(), rows, input_block.dump_structure());
359
0
    }
360
653k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
653k
        if (is_column_nullable(*to) && !is_column_nullable(*from)) {
362
0
            if (_keep_origin || !from->is_exclusive()) {
363
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
364
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
365
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
366
0
                bytes_usage += null_column.allocated_bytes();
367
0
            } else {
368
0
                to = make_nullable(from, false)->assert_mutable();
369
0
            }
370
653k
        } else {
371
653k
            if (_keep_origin || !from->is_exclusive()) {
372
653k
                to->insert_range_from(*from, 0, rows);
373
653k
                bytes_usage += from->allocated_bytes();
374
18.4E
            } else {
375
18.4E
                to = from->assert_mutable();
376
18.4E
            }
377
653k
        }
378
653k
    };
379
380
139k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
139k
            output_block, *_output_row_descriptor);
382
139k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
139k
    auto& mutable_columns = mutable_block.mutable_columns();
384
139k
    if (rows != 0) {
385
139k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
793k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
653k
            ColumnPtr column_ptr;
388
653k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
653k
            if (column_ptr->size() != rows) {
390
0
                return Status::InternalError(
391
0
                        "projection result column size {} not equal input rows {}, expr: {}",
392
0
                        column_ptr->size(), rows,
393
0
                        local_state->_projections[i]->root()->debug_string());
394
0
            }
395
653k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
653k
            bytes_usage += column_ptr->allocated_bytes();
397
653k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
653k
        }
399
139k
        DCHECK(mutable_block.rows() == rows);
400
139k
    }
401
139k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
139k
    return Status::OK();
404
139k
}
405
406
4.45M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.45M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.45M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.45M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.45M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.45M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.45M
            if (_debug_point_count++ % 2 == 0) {
413
4.45M
                return Status::OK();
414
4.45M
            }
415
4.45M
        }
416
4.45M
    });
417
418
4.45M
    Status status;
419
4.45M
    auto* local_state = state->get_local_state(operator_id());
420
4.45M
    Defer defer([&]() {
421
4.45M
        if (status.ok()) {
422
4.45M
            local_state->update_output_block_counters(*block);
423
4.45M
        }
424
4.45M
    });
425
4.45M
    if (_output_row_descriptor) {
426
274k
        local_state->clear_origin_block();
427
274k
        status = get_block(state, &local_state->_origin_block, eos);
428
274k
        if (UNLIKELY(!status.ok())) {
429
20
            return status;
430
20
        }
431
274k
        status = do_projections(state, &local_state->_origin_block, block);
432
274k
        return status;
433
274k
    }
434
4.18M
    status = get_block(state, block, eos);
435
4.18M
    RETURN_IF_ERROR(block->check_type_and_column());
436
4.18M
    return status;
437
4.18M
}
438
439
3.08M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
3.08M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
6.71k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
6.71k
        *eos = true;
443
6.71k
    }
444
445
3.08M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
3.08M
        auto op_name = to_lower(_parent->_op_name);
447
3.08M
        auto arg_op_name = dp->param<std::string>("op_name");
448
3.08M
        arg_op_name = to_lower(arg_op_name);
449
450
3.08M
        if (op_name == arg_op_name) {
451
3.08M
            *eos = true;
452
3.08M
        }
453
3.08M
    });
454
455
3.08M
    if (auto rows = block->rows()) {
456
850k
        _num_rows_returned += rows;
457
850k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
850k
    }
459
3.08M
}
460
461
29.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
29.1k
    auto result = state->get_sink_local_state_result();
463
29.1k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
29.1k
    return result.value()->terminate(state);
467
29.1k
}
468
469
17.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
17.0k
    fmt::memory_buffer debug_string_buffer;
471
472
17.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
17.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
17.0k
    return fmt::to_string(debug_string_buffer);
475
17.0k
}
476
477
16.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
16.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
16.8k
}
480
481
454k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
454k
    std::string op_name = "UNKNOWN_SINK";
483
454k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
454k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
454k
        op_name = it->second;
487
454k
    }
488
454k
    _name = op_name + "_OPERATOR";
489
454k
    return Status::OK();
490
454k
}
491
492
190k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
493
190k
    std::string op_name = print_plan_node_type(tnode.node_type);
494
190k
    _nereids_id = tnode.nereids_id;
495
190k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
496
190k
    _name = substr + "_SINK_OPERATOR";
497
190k
    return Status::OK();
498
190k
}
499
500
template <typename LocalStateType>
501
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
502
2.04M
                                                            LocalSinkStateInfo& info) {
503
2.04M
    auto local_state = LocalStateType::create_unique(this, state);
504
2.04M
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.04M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.04M
    return Status::OK();
507
2.04M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
114k
                                                            LocalSinkStateInfo& info) {
503
114k
    auto local_state = LocalStateType::create_unique(this, state);
504
114k
    RETURN_IF_ERROR(local_state->init(state, info));
505
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
114k
    return Status::OK();
507
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
432k
                                                            LocalSinkStateInfo& info) {
503
432k
    auto local_state = LocalStateType::create_unique(this, state);
504
432k
    RETURN_IF_ERROR(local_state->init(state, info));
505
432k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
432k
    return Status::OK();
507
432k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
88
                                                            LocalSinkStateInfo& info) {
503
88
    auto local_state = LocalStateType::create_unique(this, state);
504
88
    RETURN_IF_ERROR(local_state->init(state, info));
505
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
88
    return Status::OK();
507
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3
                                                            LocalSinkStateInfo& info) {
503
3
    auto local_state = LocalStateType::create_unique(this, state);
504
3
    RETURN_IF_ERROR(local_state->init(state, info));
505
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3
    return Status::OK();
507
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
518
                                                            LocalSinkStateInfo& info) {
503
518
    auto local_state = LocalStateType::create_unique(this, state);
504
518
    RETURN_IF_ERROR(local_state->init(state, info));
505
518
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
518
    return Status::OK();
507
518
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
44.9k
                                                            LocalSinkStateInfo& info) {
503
44.9k
    auto local_state = LocalStateType::create_unique(this, state);
504
44.9k
    RETURN_IF_ERROR(local_state->init(state, info));
505
44.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
44.9k
    return Status::OK();
507
44.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
9.29k
                                                            LocalSinkStateInfo& info) {
503
9.29k
    auto local_state = LocalStateType::create_unique(this, state);
504
9.29k
    RETURN_IF_ERROR(local_state->init(state, info));
505
9.29k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
9.29k
    return Status::OK();
507
9.29k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.16k
                                                            LocalSinkStateInfo& info) {
503
5.16k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.16k
    return Status::OK();
507
5.16k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
156
                                                            LocalSinkStateInfo& info) {
503
156
    auto local_state = LocalStateType::create_unique(this, state);
504
156
    RETURN_IF_ERROR(local_state->init(state, info));
505
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
156
    return Status::OK();
507
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3.38k
                                                            LocalSinkStateInfo& info) {
503
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
504
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
505
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3.38k
    return Status::OK();
507
3.38k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
32
                                                            LocalSinkStateInfo& info) {
503
32
    auto local_state = LocalStateType::create_unique(this, state);
504
32
    RETURN_IF_ERROR(local_state->init(state, info));
505
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
32
    return Status::OK();
507
32
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
160
                                                            LocalSinkStateInfo& info) {
503
160
    auto local_state = LocalStateType::create_unique(this, state);
504
160
    RETURN_IF_ERROR(local_state->init(state, info));
505
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
160
    return Status::OK();
507
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
640
                                                            LocalSinkStateInfo& info) {
503
640
    auto local_state = LocalStateType::create_unique(this, state);
504
640
    RETURN_IF_ERROR(local_state->init(state, info));
505
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
640
    return Status::OK();
507
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
6.74k
                                                            LocalSinkStateInfo& info) {
503
6.74k
    auto local_state = LocalStateType::create_unique(this, state);
504
6.74k
    RETURN_IF_ERROR(local_state->init(state, info));
505
6.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
6.74k
    return Status::OK();
507
6.74k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
95
                                                            LocalSinkStateInfo& info) {
503
95
    auto local_state = LocalStateType::create_unique(this, state);
504
95
    RETURN_IF_ERROR(local_state->init(state, info));
505
95
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
95
    return Status::OK();
507
95
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
251k
                                                            LocalSinkStateInfo& info) {
503
251k
    auto local_state = LocalStateType::create_unique(this, state);
504
251k
    RETURN_IF_ERROR(local_state->init(state, info));
505
251k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
251k
    return Status::OK();
507
251k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
42
                                                            LocalSinkStateInfo& info) {
503
42
    auto local_state = LocalStateType::create_unique(this, state);
504
42
    RETURN_IF_ERROR(local_state->init(state, info));
505
42
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
42
    return Status::OK();
507
42
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
321k
                                                            LocalSinkStateInfo& info) {
503
321k
    auto local_state = LocalStateType::create_unique(this, state);
504
321k
    RETURN_IF_ERROR(local_state->init(state, info));
505
321k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
321k
    return Status::OK();
507
321k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
149k
                                                            LocalSinkStateInfo& info) {
503
149k
    auto local_state = LocalStateType::create_unique(this, state);
504
149k
    RETURN_IF_ERROR(local_state->init(state, info));
505
149k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
149k
    return Status::OK();
507
149k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
510
                                                            LocalSinkStateInfo& info) {
503
510
    auto local_state = LocalStateType::create_unique(this, state);
504
510
    RETURN_IF_ERROR(local_state->init(state, info));
505
510
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
510
    return Status::OK();
507
510
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
162
                                                            LocalSinkStateInfo& info) {
503
162
    auto local_state = LocalStateType::create_unique(this, state);
504
162
    RETURN_IF_ERROR(local_state->init(state, info));
505
162
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
162
    return Status::OK();
507
162
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
671k
                                                            LocalSinkStateInfo& info) {
503
671k
    auto local_state = LocalStateType::create_unique(this, state);
504
671k
    RETURN_IF_ERROR(local_state->init(state, info));
505
671k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
671k
    return Status::OK();
507
671k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
8.96k
                                                            LocalSinkStateInfo& info) {
503
8.96k
    auto local_state = LocalStateType::create_unique(this, state);
504
8.96k
    RETURN_IF_ERROR(local_state->init(state, info));
505
8.96k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
8.96k
    return Status::OK();
507
8.96k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.18k
                                                            LocalSinkStateInfo& info) {
503
5.18k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.18k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.18k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.18k
    return Status::OK();
507
5.18k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3.58k
                                                            LocalSinkStateInfo& info) {
503
3.58k
    auto local_state = LocalStateType::create_unique(this, state);
504
3.58k
    RETURN_IF_ERROR(local_state->init(state, info));
505
3.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3.58k
    return Status::OK();
507
3.58k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
353
                                                            LocalSinkStateInfo& info) {
503
353
    auto local_state = LocalStateType::create_unique(this, state);
504
353
    RETURN_IF_ERROR(local_state->init(state, info));
505
353
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
353
    return Status::OK();
507
353
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.62k
                                                            LocalSinkStateInfo& info) {
503
4.62k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.62k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.62k
    return Status::OK();
507
4.62k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.51k
                                                            LocalSinkStateInfo& info) {
503
2.51k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.51k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.51k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.51k
    return Status::OK();
507
2.51k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.40k
                                                            LocalSinkStateInfo& info) {
503
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.40k
    return Status::OK();
507
2.40k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.42k
                                                            LocalSinkStateInfo& info) {
503
2.42k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.42k
    return Status::OK();
507
2.42k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1
                                                            LocalSinkStateInfo& info) {
503
1
    auto local_state = LocalStateType::create_unique(this, state);
504
1
    RETURN_IF_ERROR(local_state->init(state, info));
505
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1
    return Status::OK();
507
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
166
                                                            LocalSinkStateInfo& info) {
503
166
    auto local_state = LocalStateType::create_unique(this, state);
504
166
    RETURN_IF_ERROR(local_state->init(state, info));
505
166
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
166
    return Status::OK();
507
166
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
14
                                                            LocalSinkStateInfo& info) {
503
14
    auto local_state = LocalStateType::create_unique(this, state);
504
14
    RETURN_IF_ERROR(local_state->init(state, info));
505
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
14
    return Status::OK();
507
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
105
                                                            LocalSinkStateInfo& info) {
503
105
    auto local_state = LocalStateType::create_unique(this, state);
504
105
    RETURN_IF_ERROR(local_state->init(state, info));
505
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
105
    return Status::OK();
507
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
508
509
template <typename LocalStateType>
510
1.68M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                 LocalExchangeSharedState>) {
513
0
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
0
                                        MultiCastSharedState>) {
516
0
        throw Exception(Status::FatalError("should not reach here!"));
517
1.68M
    } else {
518
1.68M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.68M
        ss->id = operator_id();
520
1.68M
        for (auto& dest : dests_id()) {
521
1.67M
            ss->related_op_ids.insert(dest);
522
1.67M
        }
523
1.68M
        return ss;
524
1.68M
    }
525
1.68M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
93.8k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
93.8k
    } else {
518
93.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
93.8k
        ss->id = operator_id();
520
93.8k
        for (auto& dest : dests_id()) {
521
93.7k
            ss->related_op_ids.insert(dest);
522
93.7k
        }
523
93.8k
        return ss;
524
93.8k
    }
525
93.8k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
432k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
432k
    } else {
518
432k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
432k
        ss->id = operator_id();
520
432k
        for (auto& dest : dests_id()) {
521
431k
            ss->related_op_ids.insert(dest);
522
431k
        }
523
432k
        return ss;
524
432k
    }
525
432k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
88
    } else {
518
88
        auto ss = LocalStateType::SharedStateType::create_shared();
519
88
        ss->id = operator_id();
520
88
        for (auto& dest : dests_id()) {
521
88
            ss->related_op_ids.insert(dest);
522
88
        }
523
88
        return ss;
524
88
    }
525
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
3
    } else {
518
3
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3
        ss->id = operator_id();
520
3
        for (auto& dest : dests_id()) {
521
3
            ss->related_op_ids.insert(dest);
522
3
        }
523
3
        return ss;
524
3
    }
525
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
518
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
518
    } else {
518
518
        auto ss = LocalStateType::SharedStateType::create_shared();
519
518
        ss->id = operator_id();
520
518
        for (auto& dest : dests_id()) {
521
518
            ss->related_op_ids.insert(dest);
522
518
        }
523
518
        return ss;
524
518
    }
525
518
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
44.9k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
44.9k
    } else {
518
44.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
44.9k
        ss->id = operator_id();
520
44.9k
        for (auto& dest : dests_id()) {
521
44.6k
            ss->related_op_ids.insert(dest);
522
44.6k
        }
523
44.9k
        return ss;
524
44.9k
    }
525
44.9k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
9.29k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
9.29k
    } else {
518
9.29k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
9.29k
        ss->id = operator_id();
520
9.29k
        for (auto& dest : dests_id()) {
521
9.29k
            ss->related_op_ids.insert(dest);
522
9.29k
        }
523
9.29k
        return ss;
524
9.29k
    }
525
9.29k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
5.16k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
5.16k
    } else {
518
5.16k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
5.16k
        ss->id = operator_id();
520
5.16k
        for (auto& dest : dests_id()) {
521
5.16k
            ss->related_op_ids.insert(dest);
522
5.16k
        }
523
5.16k
        return ss;
524
5.16k
    }
525
5.16k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
156
    } else {
518
156
        auto ss = LocalStateType::SharedStateType::create_shared();
519
156
        ss->id = operator_id();
520
156
        for (auto& dest : dests_id()) {
521
156
            ss->related_op_ids.insert(dest);
522
156
        }
523
156
        return ss;
524
156
    }
525
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
3.38k
    } else {
518
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3.38k
        ss->id = operator_id();
520
3.38k
        for (auto& dest : dests_id()) {
521
3.38k
            ss->related_op_ids.insert(dest);
522
3.38k
        }
523
3.38k
        return ss;
524
3.38k
    }
525
3.38k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
32
    } else {
518
32
        auto ss = LocalStateType::SharedStateType::create_shared();
519
32
        ss->id = operator_id();
520
32
        for (auto& dest : dests_id()) {
521
32
            ss->related_op_ids.insert(dest);
522
32
        }
523
32
        return ss;
524
32
    }
525
32
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
160
    } else {
518
160
        auto ss = LocalStateType::SharedStateType::create_shared();
519
160
        ss->id = operator_id();
520
160
        for (auto& dest : dests_id()) {
521
160
            ss->related_op_ids.insert(dest);
522
160
        }
523
160
        return ss;
524
160
    }
525
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
640
    } else {
518
640
        auto ss = LocalStateType::SharedStateType::create_shared();
519
640
        ss->id = operator_id();
520
640
        for (auto& dest : dests_id()) {
521
640
            ss->related_op_ids.insert(dest);
522
640
        }
523
640
        return ss;
524
640
    }
525
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
6.76k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
6.76k
    } else {
518
6.76k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
6.76k
        ss->id = operator_id();
520
6.77k
        for (auto& dest : dests_id()) {
521
6.77k
            ss->related_op_ids.insert(dest);
522
6.77k
        }
523
6.76k
        return ss;
524
6.76k
    }
525
6.76k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
94
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
94
    } else {
518
94
        auto ss = LocalStateType::SharedStateType::create_shared();
519
94
        ss->id = operator_id();
520
94
        for (auto& dest : dests_id()) {
521
93
            ss->related_op_ids.insert(dest);
522
93
        }
523
94
        return ss;
524
94
    }
525
94
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
251k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
251k
    } else {
518
251k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
251k
        ss->id = operator_id();
520
251k
        for (auto& dest : dests_id()) {
521
251k
            ss->related_op_ids.insert(dest);
522
251k
        }
523
251k
        return ss;
524
251k
    }
525
251k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
44
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
44
    } else {
518
44
        auto ss = LocalStateType::SharedStateType::create_shared();
519
44
        ss->id = operator_id();
520
44
        for (auto& dest : dests_id()) {
521
44
            ss->related_op_ids.insert(dest);
522
44
        }
523
44
        return ss;
524
44
    }
525
44
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
149k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
149k
    } else {
518
149k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
149k
        ss->id = operator_id();
520
149k
        for (auto& dest : dests_id()) {
521
149k
            ss->related_op_ids.insert(dest);
522
149k
        }
523
149k
        return ss;
524
149k
    }
525
149k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
161
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
161
    } else {
518
161
        auto ss = LocalStateType::SharedStateType::create_shared();
519
161
        ss->id = operator_id();
520
161
        for (auto& dest : dests_id()) {
521
161
            ss->related_op_ids.insert(dest);
522
161
        }
523
161
        return ss;
524
161
    }
525
161
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
670k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
670k
    } else {
518
670k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
670k
        ss->id = operator_id();
520
670k
        for (auto& dest : dests_id()) {
521
666k
            ss->related_op_ids.insert(dest);
522
666k
        }
523
670k
        return ss;
524
670k
    }
525
670k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
8.98k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
8.98k
    } else {
518
8.98k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
8.98k
        ss->id = operator_id();
520
8.98k
        for (auto& dest : dests_id()) {
521
8.97k
            ss->related_op_ids.insert(dest);
522
8.97k
        }
523
8.98k
        return ss;
524
8.98k
    }
525
8.98k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
456
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
456
    } else {
518
456
        auto ss = LocalStateType::SharedStateType::create_shared();
519
456
        ss->id = operator_id();
520
456
        for (auto& dest : dests_id()) {
521
456
            ss->related_op_ids.insert(dest);
522
456
        }
523
456
        return ss;
524
456
    }
525
456
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.38k
    } else {
518
2.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.38k
        ss->id = operator_id();
520
2.38k
        for (auto& dest : dests_id()) {
521
2.37k
            ss->related_op_ids.insert(dest);
522
2.37k
        }
523
2.38k
        return ss;
524
2.38k
    }
525
2.38k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
510
2.42k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.42k
    } else {
518
2.42k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.42k
        ss->id = operator_id();
520
2.42k
        for (auto& dest : dests_id()) {
521
2.40k
            ss->related_op_ids.insert(dest);
522
2.40k
        }
523
2.42k
        return ss;
524
2.42k
    }
525
2.42k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
166
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
166
    } else {
518
166
        auto ss = LocalStateType::SharedStateType::create_shared();
519
166
        ss->id = operator_id();
520
166
        for (auto& dest : dests_id()) {
521
166
            ss->related_op_ids.insert(dest);
522
166
        }
523
166
        return ss;
524
166
    }
525
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
105
    } else {
518
105
        auto ss = LocalStateType::SharedStateType::create_shared();
519
105
        ss->id = operator_id();
520
105
        for (auto& dest : dests_id()) {
521
105
            ss->related_op_ids.insert(dest);
522
105
        }
523
105
        return ss;
524
105
    }
525
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
526
527
template <typename LocalStateType>
528
2.50M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.50M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.50M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.50M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.50M
    return Status::OK();
533
2.50M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
66.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
66.7k
    auto local_state = LocalStateType::create_unique(state, this);
530
66.7k
    RETURN_IF_ERROR(local_state->init(state, info));
531
66.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
66.7k
    return Status::OK();
533
66.7k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
303k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
303k
    auto local_state = LocalStateType::create_unique(state, this);
530
303k
    RETURN_IF_ERROR(local_state->init(state, info));
531
303k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
303k
    return Status::OK();
533
303k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
76
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
76
    auto local_state = LocalStateType::create_unique(state, this);
530
76
    RETURN_IF_ERROR(local_state->init(state, info));
531
76
    state->emplace_local_state(operator_id(), std::move(local_state));
532
76
    return Status::OK();
533
76
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
34.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
34.1k
    auto local_state = LocalStateType::create_unique(state, this);
530
34.1k
    RETURN_IF_ERROR(local_state->init(state, info));
531
34.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
34.1k
    return Status::OK();
533
34.1k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.73k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.73k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.73k
    return Status::OK();
533
6.73k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.24k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.24k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.24k
    return Status::OK();
533
7.24k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
35
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
35
    auto local_state = LocalStateType::create_unique(state, this);
530
35
    RETURN_IF_ERROR(local_state->init(state, info));
531
35
    state->emplace_local_state(operator_id(), std::move(local_state));
532
35
    return Status::OK();
533
35
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
242k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
242k
    auto local_state = LocalStateType::create_unique(state, this);
530
242k
    RETURN_IF_ERROR(local_state->init(state, info));
531
242k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
242k
    return Status::OK();
533
242k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
149k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
149k
    auto local_state = LocalStateType::create_unique(state, this);
530
149k
    RETURN_IF_ERROR(local_state->init(state, info));
531
149k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
149k
    return Status::OK();
533
149k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
592
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
592
    auto local_state = LocalStateType::create_unique(state, this);
530
592
    RETURN_IF_ERROR(local_state->init(state, info));
531
592
    state->emplace_local_state(operator_id(), std::move(local_state));
532
592
    return Status::OK();
533
592
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
152
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
152
    auto local_state = LocalStateType::create_unique(state, this);
530
152
    RETURN_IF_ERROR(local_state->init(state, info));
531
152
    state->emplace_local_state(operator_id(), std::move(local_state));
532
152
    return Status::OK();
533
152
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.45k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.45k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.45k
    return Status::OK();
533
4.45k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
365k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
365k
    auto local_state = LocalStateType::create_unique(state, this);
530
365k
    RETURN_IF_ERROR(local_state->init(state, info));
531
365k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
365k
    return Status::OK();
533
365k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.24k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.24k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.24k
    return Status::OK();
533
1.24k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
8.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
8.95k
    auto local_state = LocalStateType::create_unique(state, this);
530
8.95k
    RETURN_IF_ERROR(local_state->init(state, info));
531
8.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
8.95k
    return Status::OK();
533
8.95k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
221
    auto local_state = LocalStateType::create_unique(state, this);
530
221
    RETURN_IF_ERROR(local_state->init(state, info));
531
221
    state->emplace_local_state(operator_id(), std::move(local_state));
532
221
    return Status::OK();
533
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.68k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.68k
    return Status::OK();
533
1.68k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
55.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
55.1k
    auto local_state = LocalStateType::create_unique(state, this);
530
55.1k
    RETURN_IF_ERROR(local_state->init(state, info));
531
55.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
55.1k
    return Status::OK();
533
55.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
10.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
530
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
531
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
10.3k
    return Status::OK();
533
10.3k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
352
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
352
    auto local_state = LocalStateType::create_unique(state, this);
530
352
    RETURN_IF_ERROR(local_state->init(state, info));
531
352
    state->emplace_local_state(operator_id(), std::move(local_state));
532
352
    return Status::OK();
533
352
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.33k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.33k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.33k
    return Status::OK();
533
2.33k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.36k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.36k
    return Status::OK();
533
2.36k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
473
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
473
    auto local_state = LocalStateType::create_unique(state, this);
530
473
    RETURN_IF_ERROR(local_state->init(state, info));
531
473
    state->emplace_local_state(operator_id(), std::move(local_state));
532
473
    return Status::OK();
533
473
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.08k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.08k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.08k
    return Status::OK();
533
2.08k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.64k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.64k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.64k
    return Status::OK();
533
6.64k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
779k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
779k
    auto local_state = LocalStateType::create_unique(state, this);
530
779k
    RETURN_IF_ERROR(local_state->init(state, info));
531
779k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
779k
    return Status::OK();
533
779k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
14
    auto local_state = LocalStateType::create_unique(state, this);
530
14
    RETURN_IF_ERROR(local_state->init(state, info));
531
14
    state->emplace_local_state(operator_id(), std::move(local_state));
532
14
    return Status::OK();
533
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
151
    auto local_state = LocalStateType::create_unique(state, this);
530
151
    RETURN_IF_ERROR(local_state->init(state, info));
531
151
    state->emplace_local_state(operator_id(), std::move(local_state));
532
151
    return Status::OK();
533
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.95k
    return Status::OK();
533
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.64k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.64k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.64k
    return Status::OK();
533
1.64k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.75k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.75k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.75k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.75k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.75k
    return Status::OK();
533
2.75k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
10.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
10.5k
    auto local_state = LocalStateType::create_unique(state, this);
530
10.5k
    RETURN_IF_ERROR(local_state->init(state, info));
531
10.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
10.5k
    return Status::OK();
533
10.5k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
436k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
436k
    auto local_state = LocalStateType::create_unique(state, this);
530
436k
    RETURN_IF_ERROR(local_state->init(state, info));
531
436k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
436k
    return Status::OK();
533
436k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
2.04M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.49M
        : _num_rows_returned(0),
541
2.49M
          _rows_returned_counter(nullptr),
542
2.49M
          _parent(parent),
543
2.49M
          _state(state),
544
2.49M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.51M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.51M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.51M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.51M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.51M
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
2.51M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.51M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.51M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.51M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.51M
    if constexpr (!is_fake_shared) {
559
1.34M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
794k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
794k
                                    .first.get()
562
794k
                                    ->template cast<SharedStateArg>();
563
564
794k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
794k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
794k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
794k
        } else if (info.shared_state) {
568
469k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
0
                DCHECK(false);
570
0
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
469k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
469k
            _dependency = _shared_state->create_source_dependency(
575
469k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
469k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
469k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
469k
        } else {
579
76.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
12.0k
                DCHECK(false);
581
12.0k
            }
582
76.6k
        }
583
1.34M
    }
584
585
2.51M
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
2.51M
    _rows_returned_counter =
590
2.51M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.51M
    _blocks_returned_counter =
592
2.51M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.51M
    _output_block_bytes_counter =
594
2.51M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.51M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.51M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.51M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.51M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.51M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.51M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.51M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.51M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.51M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.51M
    _memory_used_counter =
605
2.51M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.51M
    _common_profile->add_info_string("IsColocate",
607
2.51M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.51M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.51M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.51M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.51M
    return Status::OK();
612
2.51M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
67.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
67.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
67.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
67.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
67.0k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
67.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
67.0k
    _operator_profile->add_child(_common_profile.get(), true);
556
67.0k
    _operator_profile->add_child(_custom_profile.get(), true);
557
67.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
67.0k
    if constexpr (!is_fake_shared) {
559
67.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
20.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
20.9k
                                    .first.get()
562
20.9k
                                    ->template cast<SharedStateArg>();
563
564
20.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
20.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
20.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
46.1k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
45.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
45.2k
            _dependency = _shared_state->create_source_dependency(
575
45.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
45.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
45.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
45.2k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
815
        }
583
67.0k
    }
584
585
67.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
67.0k
    _rows_returned_counter =
590
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
67.0k
    _blocks_returned_counter =
592
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
67.0k
    _output_block_bytes_counter =
594
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
67.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
67.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
67.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
67.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
67.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
67.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
67.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
67.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
67.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
67.0k
    _memory_used_counter =
605
67.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
67.0k
    _common_profile->add_info_string("IsColocate",
607
67.0k
                                     std::to_string(_parent->is_colocated_operator()));
608
67.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
67.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
67.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
67.0k
    return Status::OK();
612
67.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1
    _operator_profile->add_child(_common_profile.get(), true);
556
1
    _operator_profile->add_child(_custom_profile.get(), true);
557
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
1
    if constexpr (!is_fake_shared) {
559
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
1
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
1
            _dependency = _shared_state->create_source_dependency(
575
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
1
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
1
    }
584
585
1
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
1
    _rows_returned_counter =
590
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1
    _blocks_returned_counter =
592
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1
    _output_block_bytes_counter =
594
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1
    _memory_used_counter =
605
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1
    _common_profile->add_info_string("IsColocate",
607
1
                                     std::to_string(_parent->is_colocated_operator()));
608
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1
    return Status::OK();
612
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
251k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
251k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
251k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
251k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
251k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
251k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
251k
    _operator_profile->add_child(_common_profile.get(), true);
556
251k
    _operator_profile->add_child(_custom_profile.get(), true);
557
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
251k
    if constexpr (!is_fake_shared) {
559
251k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
251k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
243k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
243k
            _dependency = _shared_state->create_source_dependency(
575
243k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
243k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
243k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
243k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
8.53k
        }
583
251k
    }
584
585
251k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
251k
    _rows_returned_counter =
590
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
251k
    _blocks_returned_counter =
592
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
251k
    _output_block_bytes_counter =
594
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
251k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
251k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
251k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
251k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
251k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
251k
    _memory_used_counter =
605
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
251k
    _common_profile->add_info_string("IsColocate",
607
251k
                                     std::to_string(_parent->is_colocated_operator()));
608
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
251k
    return Status::OK();
612
251k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
35
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
35
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
35
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
35
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
35
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
35
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
35
    _operator_profile->add_child(_common_profile.get(), true);
556
35
    _operator_profile->add_child(_custom_profile.get(), true);
557
35
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
35
    if constexpr (!is_fake_shared) {
559
35
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
35
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
35
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
35
            _dependency = _shared_state->create_source_dependency(
575
35
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
35
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
35
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
35
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
35
    }
584
585
35
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
35
    _rows_returned_counter =
590
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
35
    _blocks_returned_counter =
592
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
35
    _output_block_bytes_counter =
594
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
35
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
35
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
35
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
35
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
35
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
35
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
35
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
35
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
35
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
35
    _memory_used_counter =
605
35
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
35
    _common_profile->add_info_string("IsColocate",
607
35
                                     std::to_string(_parent->is_colocated_operator()));
608
35
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
35
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
35
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
35
    return Status::OK();
612
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
8.98k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
8.98k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
8.98k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
8.98k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
8.98k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
8.98k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
8.98k
    _operator_profile->add_child(_common_profile.get(), true);
556
8.98k
    _operator_profile->add_child(_custom_profile.get(), true);
557
8.98k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
8.98k
    if constexpr (!is_fake_shared) {
559
8.98k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
8.98k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
8.90k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
8.90k
            _dependency = _shared_state->create_source_dependency(
575
8.90k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
8.90k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
8.90k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
8.90k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
82
        }
583
8.98k
    }
584
585
8.98k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
8.98k
    _rows_returned_counter =
590
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
8.98k
    _blocks_returned_counter =
592
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
8.98k
    _output_block_bytes_counter =
594
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
8.98k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
8.98k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
8.98k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
8.98k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
8.98k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
8.98k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
8.98k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
8.98k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
8.98k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
8.98k
    _memory_used_counter =
605
8.98k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
8.98k
    _common_profile->add_info_string("IsColocate",
607
8.98k
                                     std::to_string(_parent->is_colocated_operator()));
608
8.98k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
8.98k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
8.98k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
8.98k
    return Status::OK();
612
8.98k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
6.77k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
6.77k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
6.77k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
6.77k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
6.77k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
6.77k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
6.77k
    _operator_profile->add_child(_common_profile.get(), true);
556
6.77k
    _operator_profile->add_child(_custom_profile.get(), true);
557
6.77k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
6.77k
    if constexpr (!is_fake_shared) {
559
6.77k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
6.77k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
6.68k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
6.68k
            _dependency = _shared_state->create_source_dependency(
575
6.68k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
6.68k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
6.68k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
6.68k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
89
        }
583
6.77k
    }
584
585
6.77k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
6.77k
    _rows_returned_counter =
590
6.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
6.77k
    _blocks_returned_counter =
592
6.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
6.77k
    _output_block_bytes_counter =
594
6.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
6.77k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
6.77k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
6.77k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
6.77k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
6.77k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
6.77k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
6.77k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
6.77k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
6.77k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
6.77k
    _memory_used_counter =
605
6.77k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
6.77k
    _common_profile->add_info_string("IsColocate",
607
6.77k
                                     std::to_string(_parent->is_colocated_operator()));
608
6.77k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
6.77k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
6.77k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
6.77k
    return Status::OK();
612
6.77k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
149k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
149k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
149k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
149k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
149k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
149k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
149k
    _operator_profile->add_child(_common_profile.get(), true);
556
149k
    _operator_profile->add_child(_custom_profile.get(), true);
557
149k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
149k
    if constexpr (!is_fake_shared) {
559
149k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
149k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
147k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
147k
            _dependency = _shared_state->create_source_dependency(
575
147k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
147k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
147k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
147k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1.67k
        }
583
149k
    }
584
585
149k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
149k
    _rows_returned_counter =
590
149k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
149k
    _blocks_returned_counter =
592
149k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
149k
    _output_block_bytes_counter =
594
149k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
149k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
149k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
149k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
149k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
149k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
149k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
149k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
149k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
149k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
149k
    _memory_used_counter =
605
149k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
149k
    _common_profile->add_info_string("IsColocate",
607
149k
                                     std::to_string(_parent->is_colocated_operator()));
608
149k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
149k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
149k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
149k
    return Status::OK();
612
149k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
593
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
593
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
593
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
593
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
593
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
593
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
593
    _operator_profile->add_child(_common_profile.get(), true);
556
593
    _operator_profile->add_child(_custom_profile.get(), true);
557
593
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
593
    if constexpr (!is_fake_shared) {
559
593
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
588
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
588
                                    .first.get()
562
588
                                    ->template cast<SharedStateArg>();
563
564
588
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
588
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
588
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
588
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
0
            _dependency = _shared_state->create_source_dependency(
575
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
5
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
5
        }
583
593
    }
584
585
593
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
593
    _rows_returned_counter =
590
593
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
593
    _blocks_returned_counter =
592
593
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
593
    _output_block_bytes_counter =
594
593
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
593
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
593
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
593
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
593
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
593
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
593
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
593
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
593
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
593
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
593
    _memory_used_counter =
605
593
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
593
    _common_profile->add_info_string("IsColocate",
607
593
                                     std::to_string(_parent->is_colocated_operator()));
608
593
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
593
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
593
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
593
    return Status::OK();
612
593
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
152
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
152
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
152
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
152
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
152
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
152
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
152
    _operator_profile->add_child(_common_profile.get(), true);
556
152
    _operator_profile->add_child(_custom_profile.get(), true);
557
152
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
152
    if constexpr (!is_fake_shared) {
559
152
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
152
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
152
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
152
            _dependency = _shared_state->create_source_dependency(
575
152
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
152
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
152
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
152
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
152
    }
584
585
152
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
152
    _rows_returned_counter =
590
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
152
    _blocks_returned_counter =
592
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
152
    _output_block_bytes_counter =
594
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
152
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
152
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
152
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
152
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
152
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
152
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
152
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
152
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
152
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
152
    _memory_used_counter =
605
152
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
152
    _common_profile->add_info_string("IsColocate",
607
152
                                     std::to_string(_parent->is_colocated_operator()));
608
152
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
152
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
152
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
152
    return Status::OK();
612
152
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.17M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.17M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.17M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.17M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.17M
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
1.17M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.17M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.17M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.17M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
    if constexpr (!is_fake_shared) {
559
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
                                    .first.get()
562
                                    ->template cast<SharedStateArg>();
563
564
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
            _dependency = _shared_state->create_source_dependency(
575
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
        }
583
    }
584
585
1.17M
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
1.17M
    _rows_returned_counter =
590
1.17M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.17M
    _blocks_returned_counter =
592
1.17M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.17M
    _output_block_bytes_counter =
594
1.17M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.17M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.17M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.17M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.17M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.17M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.17M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.17M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.17M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.17M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.17M
    _memory_used_counter =
605
1.17M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.17M
    _common_profile->add_info_string("IsColocate",
607
1.17M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.17M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.17M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.17M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.17M
    return Status::OK();
612
1.17M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
55.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
55.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
55.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
55.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
55.1k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
55.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
55.1k
    _operator_profile->add_child(_common_profile.get(), true);
556
55.1k
    _operator_profile->add_child(_custom_profile.get(), true);
557
55.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
55.1k
    if constexpr (!is_fake_shared) {
559
55.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
55.1k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
2.42k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
2.42k
            _dependency = _shared_state->create_source_dependency(
575
2.42k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
2.42k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
2.42k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
52.7k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
52.7k
        }
583
55.1k
    }
584
585
55.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
55.1k
    _rows_returned_counter =
590
55.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
55.1k
    _blocks_returned_counter =
592
55.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
55.1k
    _output_block_bytes_counter =
594
55.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
55.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
55.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
55.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
55.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
55.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
55.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
55.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
55.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
55.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
55.1k
    _memory_used_counter =
605
55.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
55.1k
    _common_profile->add_info_string("IsColocate",
607
55.1k
                                     std::to_string(_parent->is_colocated_operator()));
608
55.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
55.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
55.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
55.1k
    return Status::OK();
612
55.1k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
17
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
17
    _operator_profile->add_child(_common_profile.get(), true);
556
17
    _operator_profile->add_child(_custom_profile.get(), true);
557
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
17
    if constexpr (!is_fake_shared) {
559
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
17
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
17
            _dependency = _shared_state->create_source_dependency(
575
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
17
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
17
    }
584
585
17
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
17
    _rows_returned_counter =
590
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
17
    _blocks_returned_counter =
592
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
17
    _output_block_bytes_counter =
594
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
17
    _memory_used_counter =
605
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
17
    _common_profile->add_info_string("IsColocate",
607
17
                                     std::to_string(_parent->is_colocated_operator()));
608
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
17
    return Status::OK();
612
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
10.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
10.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
10.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
10.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
10.3k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
10.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
10.3k
    _operator_profile->add_child(_common_profile.get(), true);
556
10.3k
    _operator_profile->add_child(_custom_profile.get(), true);
557
10.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
10.3k
    if constexpr (!is_fake_shared) {
559
10.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
10.3k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
10.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
10.2k
            _dependency = _shared_state->create_source_dependency(
575
10.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
10.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
10.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
10.2k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
85
        }
583
10.3k
    }
584
585
10.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
10.3k
    _rows_returned_counter =
590
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
10.3k
    _blocks_returned_counter =
592
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
10.3k
    _output_block_bytes_counter =
594
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
10.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
10.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
10.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
10.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
10.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
10.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
10.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
10.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
10.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
10.3k
    _memory_used_counter =
605
10.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
10.3k
    _common_profile->add_info_string("IsColocate",
607
10.3k
                                     std::to_string(_parent->is_colocated_operator()));
608
10.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
10.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
10.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
10.3k
    return Status::OK();
612
10.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
456
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
456
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
456
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
456
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
456
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
456
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
456
    _operator_profile->add_child(_common_profile.get(), true);
556
456
    _operator_profile->add_child(_custom_profile.get(), true);
557
456
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
456
    if constexpr (!is_fake_shared) {
559
456
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
456
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
455
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
455
            _dependency = _shared_state->create_source_dependency(
575
455
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
455
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
455
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
455
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1
        }
583
456
    }
584
585
456
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
456
    _rows_returned_counter =
590
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
456
    _blocks_returned_counter =
592
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
456
    _output_block_bytes_counter =
594
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
456
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
456
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
456
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
456
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
456
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
456
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
456
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
456
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
456
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
456
    _memory_used_counter =
605
456
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
456
    _common_profile->add_info_string("IsColocate",
607
456
                                     std::to_string(_parent->is_colocated_operator()));
608
456
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
456
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
456
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
456
    return Status::OK();
612
456
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.78k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.78k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.78k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.78k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.78k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
4.78k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.78k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.78k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.78k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.78k
    if constexpr (!is_fake_shared) {
559
4.78k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
4.78k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
4.22k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.22k
            _dependency = _shared_state->create_source_dependency(
575
4.22k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.22k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.22k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.22k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
560
        }
583
4.78k
    }
584
585
4.78k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
4.78k
    _rows_returned_counter =
590
4.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.78k
    _blocks_returned_counter =
592
4.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.78k
    _output_block_bytes_counter =
594
4.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.78k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.78k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.78k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.78k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.78k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.78k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.78k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.78k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.78k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.78k
    _memory_used_counter =
605
4.78k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.78k
    _common_profile->add_info_string("IsColocate",
607
4.78k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.78k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.78k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.78k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.78k
    return Status::OK();
612
4.78k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
785k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
785k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
785k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
785k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
785k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
785k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
785k
    _operator_profile->add_child(_common_profile.get(), true);
556
785k
    _operator_profile->add_child(_custom_profile.get(), true);
557
785k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
785k
    if constexpr (!is_fake_shared) {
559
785k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
773k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
773k
                                    .first.get()
562
773k
                                    ->template cast<SharedStateArg>();
563
564
773k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
773k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
773k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
773k
        } else if (info.shared_state) {
568
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
0
                DCHECK(false);
570
0
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
0
            _dependency = _shared_state->create_source_dependency(
575
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
12.0k
        } else {
579
12.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
12.0k
                DCHECK(false);
581
12.0k
            }
582
12.0k
        }
583
785k
    }
584
585
785k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
785k
    _rows_returned_counter =
590
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
785k
    _blocks_returned_counter =
592
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
785k
    _output_block_bytes_counter =
594
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
785k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
785k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
785k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
785k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
785k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
785k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
785k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
785k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
785k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
785k
    _memory_used_counter =
605
785k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
785k
    _common_profile->add_info_string("IsColocate",
607
785k
                                     std::to_string(_parent->is_colocated_operator()));
608
785k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
785k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
785k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
785k
    return Status::OK();
612
785k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
151
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
151
    _operator_profile->add_child(_common_profile.get(), true);
556
151
    _operator_profile->add_child(_custom_profile.get(), true);
557
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
151
    if constexpr (!is_fake_shared) {
559
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
151
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
151
            _dependency = _shared_state->create_source_dependency(
575
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
151
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
151
    }
584
585
151
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
151
    _rows_returned_counter =
590
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
151
    _blocks_returned_counter =
592
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
151
    _output_block_bytes_counter =
594
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
151
    _memory_used_counter =
605
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
151
    _common_profile->add_info_string("IsColocate",
607
151
                                     std::to_string(_parent->is_colocated_operator()));
608
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
151
    return Status::OK();
612
151
}
613
614
template <typename SharedStateArg>
615
2.51M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.51M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.51M
    _projections.resize(_parent->_projections.size());
618
3.02M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
505k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
505k
    }
621
5.20M
    for (size_t i = 0; i < _projections.size(); i++) {
622
2.68M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
2.68M
    }
624
2.51M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.53M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
11.5k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
76.4k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
64.9k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
64.9k
                    state, _intermediate_projections[i][j]));
630
64.9k
        }
631
11.5k
    }
632
2.51M
    return Status::OK();
633
2.51M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
67.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
67.0k
    _conjuncts.resize(_parent->_conjuncts.size());
617
67.0k
    _projections.resize(_parent->_projections.size());
618
67.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
861
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
861
    }
621
335k
    for (size_t i = 0; i < _projections.size(); i++) {
622
268k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
268k
    }
624
67.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
68.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1.16k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
13.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
12.0k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
12.0k
                    state, _intermediate_projections[i][j]));
630
12.0k
        }
631
1.16k
    }
632
67.0k
    return Status::OK();
633
67.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
3
    _conjuncts.resize(_parent->_conjuncts.size());
617
3
    _projections.resize(_parent->_projections.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
3
    return Status::OK();
633
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
252k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
252k
    _conjuncts.resize(_parent->_conjuncts.size());
617
252k
    _projections.resize(_parent->_projections.size());
618
252k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
252k
    for (size_t i = 0; i < _projections.size(); i++) {
622
359
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
359
    }
624
252k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
252k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
252k
    return Status::OK();
633
252k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
35
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
35
    _conjuncts.resize(_parent->_conjuncts.size());
617
35
    _projections.resize(_parent->_projections.size());
618
35
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
35
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
35
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
35
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
35
    return Status::OK();
633
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
8.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
8.97k
    _conjuncts.resize(_parent->_conjuncts.size());
617
8.97k
    _projections.resize(_parent->_projections.size());
618
9.05k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
71
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
71
    }
621
60.5k
    for (size_t i = 0; i < _projections.size(); i++) {
622
51.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
51.5k
    }
624
8.97k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
9.11k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
134
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
833
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
699
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
699
                    state, _intermediate_projections[i][j]));
630
699
        }
631
134
    }
632
8.97k
    return Status::OK();
633
8.97k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
6.77k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
6.77k
    _conjuncts.resize(_parent->_conjuncts.size());
617
6.77k
    _projections.resize(_parent->_projections.size());
618
7.56k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
786
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
786
    }
621
18.1k
    for (size_t i = 0; i < _projections.size(); i++) {
622
11.3k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
11.3k
    }
624
6.77k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
6.87k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
93
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
706
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
613
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
613
                    state, _intermediate_projections[i][j]));
630
613
        }
631
93
    }
632
6.77k
    return Status::OK();
633
6.77k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
149k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
149k
    _conjuncts.resize(_parent->_conjuncts.size());
617
149k
    _projections.resize(_parent->_projections.size());
618
153k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
3.66k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
3.66k
    }
621
411k
    for (size_t i = 0; i < _projections.size(); i++) {
622
261k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
261k
    }
624
149k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
149k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
220
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
1.49k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
1.27k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
1.27k
                    state, _intermediate_projections[i][j]));
630
1.27k
        }
631
220
    }
632
149k
    return Status::OK();
633
149k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
592
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
592
    _conjuncts.resize(_parent->_conjuncts.size());
617
592
    _projections.resize(_parent->_projections.size());
618
605
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
13
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
13
    }
621
1.77k
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.18k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.18k
    }
624
592
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
592
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
592
    return Status::OK();
633
592
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
156
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
156
    _conjuncts.resize(_parent->_conjuncts.size());
617
156
    _projections.resize(_parent->_projections.size());
618
156
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
376
    for (size_t i = 0; i < _projections.size(); i++) {
622
220
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
220
    }
624
156
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
156
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
156
    return Status::OK();
633
156
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.17M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.17M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.17M
    _projections.resize(_parent->_projections.size());
618
1.67M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
496k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
496k
    }
621
3.16M
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.99M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.99M
    }
624
1.17M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.18M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
9.96k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
60.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
50.3k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
50.3k
                    state, _intermediate_projections[i][j]));
630
50.3k
        }
631
9.96k
    }
632
1.17M
    return Status::OK();
633
1.17M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
55.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
55.2k
    _conjuncts.resize(_parent->_conjuncts.size());
617
55.2k
    _projections.resize(_parent->_projections.size());
618
55.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
150k
    for (size_t i = 0; i < _projections.size(); i++) {
622
95.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
95.4k
    }
624
55.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
55.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
55.2k
    return Status::OK();
633
55.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
17
    _conjuncts.resize(_parent->_conjuncts.size());
617
17
    _projections.resize(_parent->_projections.size());
618
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
17
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
17
    return Status::OK();
633
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
10.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
10.3k
    _conjuncts.resize(_parent->_conjuncts.size());
617
10.3k
    _projections.resize(_parent->_projections.size());
618
14.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
3.65k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
3.65k
    }
621
10.3k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
10.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
10.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
10.3k
    return Status::OK();
633
10.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
456
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
456
    _conjuncts.resize(_parent->_conjuncts.size());
617
456
    _projections.resize(_parent->_projections.size());
618
456
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
456
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
456
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
456
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
456
    return Status::OK();
633
456
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.91k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.91k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.91k
    _projections.resize(_parent->_projections.size());
618
4.91k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
4.91k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
4.91k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.91k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
4.91k
    return Status::OK();
633
4.91k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
785k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
785k
    _conjuncts.resize(_parent->_conjuncts.size());
617
785k
    _projections.resize(_parent->_projections.size());
618
785k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
785k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
785k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
785k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
785k
    return Status::OK();
633
785k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
151
    _conjuncts.resize(_parent->_conjuncts.size());
617
151
    _projections.resize(_parent->_projections.size());
618
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
447
    for (size_t i = 0; i < _projections.size(); i++) {
622
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
296
    }
624
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
2
                    state, _intermediate_projections[i][j]));
630
2
        }
631
1
    }
632
151
    return Status::OK();
633
151
}
634
635
template <typename SharedStateArg>
636
6.19k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
6.19k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
6.19k
    _terminated = true;
641
6.19k
    return Status::OK();
642
6.19k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
338
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
338
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
338
    _terminated = true;
641
338
    return Status::OK();
642
338
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
93
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
93
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
93
    _terminated = true;
641
93
    return Status::OK();
642
93
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
84
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
84
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
84
    _terminated = true;
641
84
    return Status::OK();
642
84
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
219
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
219
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
219
    _terminated = true;
641
219
    return Status::OK();
642
219
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
4.37k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
4.37k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
4.37k
    _terminated = true;
641
4.37k
    return Status::OK();
642
4.37k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
5
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
5
    _terminated = true;
641
5
    return Status::OK();
642
5
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
10
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
10
    _terminated = true;
641
10
    return Status::OK();
642
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
117
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
117
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
117
    _terminated = true;
641
117
    return Status::OK();
642
117
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
940
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
940
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
940
    _terminated = true;
641
940
    return Status::OK();
642
940
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
14
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
14
    _terminated = true;
641
14
    return Status::OK();
642
14
}
643
644
template <typename SharedStateArg>
645
2.80M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.80M
    if (_closed) {
647
282k
        return Status::OK();
648
282k
    }
649
2.51M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.34M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.34M
    }
652
2.51M
    _closed = true;
653
2.51M
    return Status::OK();
654
2.80M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
67.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
67.0k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
67.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
67.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
67.0k
    }
652
67.0k
    _closed = true;
653
67.0k
    return Status::OK();
654
67.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
4
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4
    }
652
4
    _closed = true;
653
4
    return Status::OK();
654
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
501k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
501k
    if (_closed) {
647
251k
        return Status::OK();
648
251k
    }
649
250k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
250k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
250k
    }
652
250k
    _closed = true;
653
250k
    return Status::OK();
654
501k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
35
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
35
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
35
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
35
    }
652
35
    _closed = true;
653
35
    return Status::OK();
654
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
8.98k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
8.98k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
8.98k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
8.98k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
8.98k
    }
652
8.98k
    _closed = true;
653
8.98k
    return Status::OK();
654
8.98k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
13.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
13.6k
    if (_closed) {
647
6.85k
        return Status::OK();
648
6.85k
    }
649
6.76k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
6.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
6.76k
    }
652
6.76k
    _closed = true;
653
6.76k
    return Status::OK();
654
13.6k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
149k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
149k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
149k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
149k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
149k
    }
652
149k
    _closed = true;
653
149k
    return Status::OK();
654
149k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
589
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
589
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
589
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
589
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
589
    }
652
589
    _closed = true;
653
589
    return Status::OK();
654
589
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
151
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
151
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
151
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
151
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
151
    }
652
151
    _closed = true;
653
151
    return Status::OK();
654
151
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.19M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.19M
    if (_closed) {
647
18.6k
        return Status::OK();
648
18.6k
    }
649
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
    }
652
1.17M
    _closed = true;
653
1.17M
    return Status::OK();
654
1.19M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
55.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
55.2k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
55.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
55.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
55.2k
    }
652
55.2k
    _closed = true;
653
55.2k
    return Status::OK();
654
55.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
28
    if (_closed) {
647
14
        return Status::OK();
648
14
    }
649
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
14
    }
652
14
    _closed = true;
653
14
    return Status::OK();
654
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
10.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.3k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
10.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
10.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
10.3k
    }
652
10.3k
    _closed = true;
653
10.3k
    return Status::OK();
654
10.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
708
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
708
    if (_closed) {
647
354
        return Status::OK();
648
354
    }
649
354
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
354
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
354
    }
652
354
    _closed = true;
653
354
    return Status::OK();
654
708
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.82k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.82k
    if (_closed) {
647
4.92k
        return Status::OK();
648
4.92k
    }
649
4.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.90k
    }
652
4.90k
    _closed = true;
653
4.90k
    return Status::OK();
654
9.82k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
787k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
787k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
787k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
787k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
787k
    }
652
787k
    _closed = true;
653
787k
    return Status::OK();
654
787k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
304
    if (_closed) {
647
162
        return Status::OK();
648
162
    }
649
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
142
    }
652
142
    _closed = true;
653
142
    return Status::OK();
654
304
}
655
656
template <typename SharedState>
657
2.04M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2.04M
    _operator_profile =
660
2.04M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2.04M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2.04M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
2.04M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2.04M
    _operator_profile->add_child(_common_profile, true);
669
2.04M
    _operator_profile->add_child(_custom_profile, true);
670
671
2.04M
    _operator_profile->set_metadata(_parent->node_id());
672
2.04M
    _wait_for_finish_dependency_timer =
673
2.04M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2.04M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2.04M
    if constexpr (!is_fake_shared) {
676
1.37M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.37M
            info.shared_state_map.end()) {
678
342k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
321k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
321k
            }
681
342k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
342k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
342k
                                                  ? 0
684
342k
                                                  : info.task_idx]
685
342k
                                  .get();
686
342k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
1.03M
        } else {
688
1.03M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
1.10k
                DCHECK(false);
690
1.10k
            }
691
1.03M
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.03M
            _dependency = _shared_state->create_sink_dependency(
693
1.03M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.03M
        }
695
1.37M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.37M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.37M
    }
698
699
2.04M
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
2.04M
    _rows_input_counter =
704
2.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2.04M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2.04M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2.04M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2.04M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2.04M
    _memory_used_counter =
710
2.04M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2.04M
    _common_profile->add_info_string("IsColocate",
712
2.04M
                                     std::to_string(_parent->is_colocated_operator()));
713
2.04M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2.04M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2.04M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2.04M
    return Status::OK();
717
2.04M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
114k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
114k
    _operator_profile =
660
114k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
114k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
114k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
114k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
114k
    _operator_profile->add_child(_common_profile, true);
669
114k
    _operator_profile->add_child(_custom_profile, true);
670
671
114k
    _operator_profile->set_metadata(_parent->node_id());
672
114k
    _wait_for_finish_dependency_timer =
673
114k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
114k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
114k
    if constexpr (!is_fake_shared) {
676
114k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
114k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
21.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
21.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
21.1k
                                                  ? 0
684
21.1k
                                                  : info.task_idx]
685
21.1k
                                  .get();
686
21.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
93.8k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
93.8k
            _shared_state = info.shared_state->template cast<SharedState>();
692
93.8k
            _dependency = _shared_state->create_sink_dependency(
693
93.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
93.8k
        }
695
114k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
114k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
114k
    }
698
699
114k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
114k
    _rows_input_counter =
704
114k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
114k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
114k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
114k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
114k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
114k
    _memory_used_counter =
710
114k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
114k
    _common_profile->add_info_string("IsColocate",
712
114k
                                     std::to_string(_parent->is_colocated_operator()));
713
114k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
114k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
114k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
114k
    return Status::OK();
717
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2
    _operator_profile =
660
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2
    _operator_profile->add_child(_common_profile, true);
669
2
    _operator_profile->add_child(_custom_profile, true);
670
671
2
    _operator_profile->set_metadata(_parent->node_id());
672
2
    _wait_for_finish_dependency_timer =
673
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2
    if constexpr (!is_fake_shared) {
676
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
2
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
2
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
2
            _shared_state = info.shared_state->template cast<SharedState>();
692
2
            _dependency = _shared_state->create_sink_dependency(
693
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
2
        }
695
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
2
    }
698
699
2
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
2
    _rows_input_counter =
704
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2
    _memory_used_counter =
710
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2
    _common_profile->add_info_string("IsColocate",
712
2
                                     std::to_string(_parent->is_colocated_operator()));
713
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2
    return Status::OK();
717
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
251k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
251k
    _operator_profile =
660
251k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
251k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
251k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
251k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
251k
    _operator_profile->add_child(_common_profile, true);
669
251k
    _operator_profile->add_child(_custom_profile, true);
670
671
251k
    _operator_profile->set_metadata(_parent->node_id());
672
251k
    _wait_for_finish_dependency_timer =
673
251k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
251k
    if constexpr (!is_fake_shared) {
676
251k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
251k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
251k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
251k
            _shared_state = info.shared_state->template cast<SharedState>();
692
251k
            _dependency = _shared_state->create_sink_dependency(
693
251k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
251k
        }
695
251k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
251k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
251k
    }
698
699
251k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
251k
    _rows_input_counter =
704
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
251k
    _memory_used_counter =
710
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
251k
    _common_profile->add_info_string("IsColocate",
712
251k
                                     std::to_string(_parent->is_colocated_operator()));
713
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
251k
    return Status::OK();
717
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
42
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
42
    _operator_profile =
660
42
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
42
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
42
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
42
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
42
    _operator_profile->add_child(_common_profile, true);
669
42
    _operator_profile->add_child(_custom_profile, true);
670
671
42
    _operator_profile->set_metadata(_parent->node_id());
672
42
    _wait_for_finish_dependency_timer =
673
42
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
42
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
42
    if constexpr (!is_fake_shared) {
676
42
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
42
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
42
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
42
            _shared_state = info.shared_state->template cast<SharedState>();
692
42
            _dependency = _shared_state->create_sink_dependency(
693
42
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
42
        }
695
42
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
42
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
42
    }
698
699
42
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
42
    _rows_input_counter =
704
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
42
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
42
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
42
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
42
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
42
    _memory_used_counter =
710
42
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
42
    _common_profile->add_info_string("IsColocate",
712
42
                                     std::to_string(_parent->is_colocated_operator()));
713
42
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
42
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
42
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
42
    return Status::OK();
717
42
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
8.97k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
8.97k
    _operator_profile =
660
8.97k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
8.97k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
8.97k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
8.97k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
8.97k
    _operator_profile->add_child(_common_profile, true);
669
8.97k
    _operator_profile->add_child(_custom_profile, true);
670
671
8.97k
    _operator_profile->set_metadata(_parent->node_id());
672
8.97k
    _wait_for_finish_dependency_timer =
673
8.97k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
8.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
8.97k
    if constexpr (!is_fake_shared) {
676
8.97k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
8.97k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
8.97k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
8.97k
            _shared_state = info.shared_state->template cast<SharedState>();
692
8.97k
            _dependency = _shared_state->create_sink_dependency(
693
8.97k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
8.97k
        }
695
8.97k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
8.97k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
8.97k
    }
698
699
8.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
8.97k
    _rows_input_counter =
704
8.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
8.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
8.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
8.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
8.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
8.97k
    _memory_used_counter =
710
8.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
8.97k
    _common_profile->add_info_string("IsColocate",
712
8.97k
                                     std::to_string(_parent->is_colocated_operator()));
713
8.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
8.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
8.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
8.97k
    return Status::OK();
717
8.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
6.76k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
6.76k
    _operator_profile =
660
6.76k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
6.76k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
6.76k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
6.76k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
6.76k
    _operator_profile->add_child(_common_profile, true);
669
6.76k
    _operator_profile->add_child(_custom_profile, true);
670
671
6.76k
    _operator_profile->set_metadata(_parent->node_id());
672
6.76k
    _wait_for_finish_dependency_timer =
673
6.76k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
6.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
6.76k
    if constexpr (!is_fake_shared) {
676
6.76k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
6.76k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
6.76k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
6.76k
            _shared_state = info.shared_state->template cast<SharedState>();
692
6.76k
            _dependency = _shared_state->create_sink_dependency(
693
6.76k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
6.76k
        }
695
6.76k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
6.76k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
6.76k
    }
698
699
6.76k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
6.76k
    _rows_input_counter =
704
6.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
6.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
6.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
6.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
6.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
6.76k
    _memory_used_counter =
710
6.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
6.76k
    _common_profile->add_info_string("IsColocate",
712
6.76k
                                     std::to_string(_parent->is_colocated_operator()));
713
6.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
6.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
6.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
6.76k
    return Status::OK();
717
6.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
149k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
149k
    _operator_profile =
660
149k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
149k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
149k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
149k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
149k
    _operator_profile->add_child(_common_profile, true);
669
149k
    _operator_profile->add_child(_custom_profile, true);
670
671
149k
    _operator_profile->set_metadata(_parent->node_id());
672
149k
    _wait_for_finish_dependency_timer =
673
149k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
149k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
149k
    if constexpr (!is_fake_shared) {
676
149k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
149k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
149k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
149k
            _shared_state = info.shared_state->template cast<SharedState>();
692
149k
            _dependency = _shared_state->create_sink_dependency(
693
149k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
149k
        }
695
149k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
149k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
149k
    }
698
699
149k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
149k
    _rows_input_counter =
704
149k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
149k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
149k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
149k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
149k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
149k
    _memory_used_counter =
710
149k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
149k
    _common_profile->add_info_string("IsColocate",
712
149k
                                     std::to_string(_parent->is_colocated_operator()));
713
149k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
149k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
149k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
149k
    return Status::OK();
717
149k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
515
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
515
    _operator_profile =
660
515
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
515
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
515
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
515
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
515
    _operator_profile->add_child(_common_profile, true);
669
515
    _operator_profile->add_child(_custom_profile, true);
670
671
515
    _operator_profile->set_metadata(_parent->node_id());
672
515
    _wait_for_finish_dependency_timer =
673
515
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
515
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
515
    if constexpr (!is_fake_shared) {
676
515
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
515
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
508
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
508
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
508
                                                  ? 0
684
508
                                                  : info.task_idx]
685
508
                                  .get();
686
508
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
508
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
7
            _shared_state = info.shared_state->template cast<SharedState>();
692
7
            _dependency = _shared_state->create_sink_dependency(
693
7
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
7
        }
695
515
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
515
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
515
    }
698
699
515
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
515
    _rows_input_counter =
704
515
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
515
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
515
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
515
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
515
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
515
    _memory_used_counter =
710
515
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
515
    _common_profile->add_info_string("IsColocate",
712
515
                                     std::to_string(_parent->is_colocated_operator()));
713
515
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
515
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
515
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
515
    return Status::OK();
717
515
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
162
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
162
    _operator_profile =
660
162
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
162
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
162
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
162
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
162
    _operator_profile->add_child(_common_profile, true);
669
162
    _operator_profile->add_child(_custom_profile, true);
670
671
162
    _operator_profile->set_metadata(_parent->node_id());
672
162
    _wait_for_finish_dependency_timer =
673
162
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
162
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
162
    if constexpr (!is_fake_shared) {
676
162
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
162
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
162
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
162
            _shared_state = info.shared_state->template cast<SharedState>();
692
162
            _dependency = _shared_state->create_sink_dependency(
693
162
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
162
        }
695
162
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
162
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
162
    }
698
699
162
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
162
    _rows_input_counter =
704
162
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
162
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
162
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
162
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
162
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
162
    _memory_used_counter =
710
162
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
162
    _common_profile->add_info_string("IsColocate",
712
162
                                     std::to_string(_parent->is_colocated_operator()));
713
162
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
162
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
162
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
162
    return Status::OK();
717
162
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
675k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
675k
    _operator_profile =
660
675k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
675k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
675k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
675k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
675k
    _operator_profile->add_child(_common_profile, true);
669
675k
    _operator_profile->add_child(_custom_profile, true);
670
671
675k
    _operator_profile->set_metadata(_parent->node_id());
672
675k
    _wait_for_finish_dependency_timer =
673
675k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
675k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
    if constexpr (!is_fake_shared) {
676
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
                                                  ? 0
684
                                                  : info.task_idx]
685
                                  .get();
686
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
            _shared_state = info.shared_state->template cast<SharedState>();
692
            _dependency = _shared_state->create_sink_dependency(
693
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
        }
695
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
    }
698
699
675k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
675k
    _rows_input_counter =
704
675k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
675k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
675k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
675k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
675k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
675k
    _memory_used_counter =
710
675k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
675k
    _common_profile->add_info_string("IsColocate",
712
675k
                                     std::to_string(_parent->is_colocated_operator()));
713
675k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
675k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
675k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
675k
    return Status::OK();
717
675k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.19k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.19k
    _operator_profile =
660
5.19k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.19k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.19k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
5.19k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.19k
    _operator_profile->add_child(_common_profile, true);
669
5.19k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.19k
    _operator_profile->set_metadata(_parent->node_id());
672
5.19k
    _wait_for_finish_dependency_timer =
673
5.19k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.19k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.19k
    if constexpr (!is_fake_shared) {
676
5.19k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.19k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
5.19k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.19k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.19k
            _dependency = _shared_state->create_sink_dependency(
693
5.19k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.19k
        }
695
5.19k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.19k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.19k
    }
698
699
5.19k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
5.19k
    _rows_input_counter =
704
5.19k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.19k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.19k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.19k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.19k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.19k
    _memory_used_counter =
710
5.19k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.19k
    _common_profile->add_info_string("IsColocate",
712
5.19k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.19k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.19k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.19k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.19k
    return Status::OK();
717
5.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
456
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
456
    _operator_profile =
660
456
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
456
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
456
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
456
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
456
    _operator_profile->add_child(_common_profile, true);
669
456
    _operator_profile->add_child(_custom_profile, true);
670
671
456
    _operator_profile->set_metadata(_parent->node_id());
672
456
    _wait_for_finish_dependency_timer =
673
456
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
456
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
456
    if constexpr (!is_fake_shared) {
676
456
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
456
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
456
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
456
            _shared_state = info.shared_state->template cast<SharedState>();
692
456
            _dependency = _shared_state->create_sink_dependency(
693
456
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
456
        }
695
456
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
456
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
456
    }
698
699
456
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
456
    _rows_input_counter =
704
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
456
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
456
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
456
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
456
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
456
    _memory_used_counter =
710
456
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
456
    _common_profile->add_info_string("IsColocate",
712
456
                                     std::to_string(_parent->is_colocated_operator()));
713
456
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
456
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
456
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
456
    return Status::OK();
717
456
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
3.58k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
3.58k
    _operator_profile =
660
3.58k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
3.58k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
3.58k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
3.58k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
3.58k
    _operator_profile->add_child(_common_profile, true);
669
3.58k
    _operator_profile->add_child(_custom_profile, true);
670
671
3.58k
    _operator_profile->set_metadata(_parent->node_id());
672
3.58k
    _wait_for_finish_dependency_timer =
673
3.58k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
3.58k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
3.58k
    if constexpr (!is_fake_shared) {
676
3.58k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
3.58k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
3.58k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
3.58k
            _shared_state = info.shared_state->template cast<SharedState>();
692
3.58k
            _dependency = _shared_state->create_sink_dependency(
693
3.58k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
3.58k
        }
695
3.58k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
3.58k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
3.58k
    }
698
699
3.58k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
3.58k
    _rows_input_counter =
704
3.58k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
3.58k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
3.58k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
3.58k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
3.58k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
3.58k
    _memory_used_counter =
710
3.58k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
3.58k
    _common_profile->add_info_string("IsColocate",
712
3.58k
                                     std::to_string(_parent->is_colocated_operator()));
713
3.58k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
3.58k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
3.58k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
3.58k
    return Status::OK();
717
3.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
12.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
12.1k
    _operator_profile =
660
12.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
12.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
12.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
12.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
12.1k
    _operator_profile->add_child(_common_profile, true);
669
12.1k
    _operator_profile->add_child(_custom_profile, true);
670
671
12.1k
    _operator_profile->set_metadata(_parent->node_id());
672
12.1k
    _wait_for_finish_dependency_timer =
673
12.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
12.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
12.1k
    if constexpr (!is_fake_shared) {
676
12.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
12.1k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
12.1k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
12.1k
            _shared_state = info.shared_state->template cast<SharedState>();
692
12.1k
            _dependency = _shared_state->create_sink_dependency(
693
12.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
12.1k
        }
695
12.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
12.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
12.1k
    }
698
699
12.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
12.1k
    _rows_input_counter =
704
12.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
12.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
12.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
12.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
12.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
12.1k
    _memory_used_counter =
710
12.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
12.1k
    _common_profile->add_info_string("IsColocate",
712
12.1k
                                     std::to_string(_parent->is_colocated_operator()));
713
12.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
12.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
12.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
12.1k
    return Status::OK();
717
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
322k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
322k
    _operator_profile =
660
322k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
322k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
322k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
322k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
322k
    _operator_profile->add_child(_common_profile, true);
669
322k
    _operator_profile->add_child(_custom_profile, true);
670
671
322k
    _operator_profile->set_metadata(_parent->node_id());
672
322k
    _wait_for_finish_dependency_timer =
673
322k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
322k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
322k
    if constexpr (!is_fake_shared) {
676
322k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
322k
            info.shared_state_map.end()) {
678
321k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
321k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
321k
            }
681
321k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
321k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
321k
                                                  ? 0
684
321k
                                                  : info.task_idx]
685
321k
                                  .get();
686
321k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
321k
        } else {
688
1.10k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
1.10k
                DCHECK(false);
690
1.10k
            }
691
1.10k
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.10k
            _dependency = _shared_state->create_sink_dependency(
693
1.10k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.10k
        }
695
322k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
322k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
322k
    }
698
699
322k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
322k
    _rows_input_counter =
704
322k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
322k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
322k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
322k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
322k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
322k
    _memory_used_counter =
710
322k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
322k
    _common_profile->add_info_string("IsColocate",
712
322k
                                     std::to_string(_parent->is_colocated_operator()));
713
322k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
322k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
322k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
322k
    return Status::OK();
717
322k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
497k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
497k
    _operator_profile =
660
497k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
497k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
497k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
497k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
497k
    _operator_profile->add_child(_common_profile, true);
669
497k
    _operator_profile->add_child(_custom_profile, true);
670
671
497k
    _operator_profile->set_metadata(_parent->node_id());
672
497k
    _wait_for_finish_dependency_timer =
673
497k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
497k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
497k
    if constexpr (!is_fake_shared) {
676
497k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
497k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
497k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
497k
            _shared_state = info.shared_state->template cast<SharedState>();
692
497k
            _dependency = _shared_state->create_sink_dependency(
693
497k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
497k
        }
695
497k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
497k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
497k
    }
698
699
497k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
497k
    _rows_input_counter =
704
497k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
497k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
497k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
497k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
497k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
497k
    _memory_used_counter =
710
497k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
497k
    _common_profile->add_info_string("IsColocate",
712
497k
                                     std::to_string(_parent->is_colocated_operator()));
713
497k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
497k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
497k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
497k
    return Status::OK();
717
497k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
17
    _operator_profile =
660
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
17
    _operator_profile->add_child(_common_profile, true);
669
17
    _operator_profile->add_child(_custom_profile, true);
670
671
17
    _operator_profile->set_metadata(_parent->node_id());
672
17
    _wait_for_finish_dependency_timer =
673
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
17
    if constexpr (!is_fake_shared) {
676
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
17
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
17
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
17
            _shared_state = info.shared_state->template cast<SharedState>();
692
17
            _dependency = _shared_state->create_sink_dependency(
693
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
17
        }
695
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
17
    }
698
699
17
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
17
    _rows_input_counter =
704
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
17
    _memory_used_counter =
710
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
17
    _common_profile->add_info_string("IsColocate",
712
17
                                     std::to_string(_parent->is_colocated_operator()));
713
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
17
    return Status::OK();
717
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
302
    _operator_profile =
660
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
302
    _operator_profile->add_child(_common_profile, true);
669
302
    _operator_profile->add_child(_custom_profile, true);
670
671
302
    _operator_profile->set_metadata(_parent->node_id());
672
302
    _wait_for_finish_dependency_timer =
673
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
302
    if constexpr (!is_fake_shared) {
676
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
302
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
302
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
302
            _shared_state = info.shared_state->template cast<SharedState>();
692
302
            _dependency = _shared_state->create_sink_dependency(
693
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
302
        }
695
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
302
    }
698
699
302
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
302
    _rows_input_counter =
704
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
302
    _memory_used_counter =
710
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
302
    _common_profile->add_info_string("IsColocate",
712
302
                                     std::to_string(_parent->is_colocated_operator()));
713
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
302
    return Status::OK();
717
302
}
718
719
template <typename SharedState>
720
2.05M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
2.05M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
2.05M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.37M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.37M
    }
727
2.05M
    _closed = true;
728
2.05M
    return Status::OK();
729
2.05M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
114k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
114k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
114k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
114k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
114k
    }
727
114k
    _closed = true;
728
114k
    return Status::OK();
729
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1
    }
727
1
    _closed = true;
728
1
    return Status::OK();
729
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
251k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
251k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
251k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
251k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
251k
    }
727
251k
    _closed = true;
728
251k
    return Status::OK();
729
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
33
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
33
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
31
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
31
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
31
    }
727
31
    _closed = true;
728
31
    return Status::OK();
729
33
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
8.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
8.96k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
8.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
8.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
8.96k
    }
727
8.96k
    _closed = true;
728
8.96k
    return Status::OK();
729
8.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
6.74k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
6.74k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
6.74k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
6.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
6.74k
    }
727
6.74k
    _closed = true;
728
6.74k
    return Status::OK();
729
6.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
149k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
149k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
149k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
149k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
149k
    }
727
149k
    _closed = true;
728
149k
    return Status::OK();
729
149k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
511
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
511
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
511
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
511
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
511
    }
727
511
    _closed = true;
728
511
    return Status::OK();
729
511
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
151
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
151
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
151
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
151
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
151
    }
727
151
    _closed = true;
728
151
    return Status::OK();
729
151
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
676k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
676k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
    }
727
676k
    _closed = true;
728
676k
    return Status::OK();
729
676k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.20k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.20k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.20k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.20k
    }
727
5.20k
    _closed = true;
728
5.20k
    return Status::OK();
729
5.20k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
352
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
352
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
352
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
352
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
352
    }
727
352
    _closed = true;
728
352
    return Status::OK();
729
352
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
3.59k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
3.59k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
3.59k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
3.59k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
3.59k
    }
727
3.59k
    _closed = true;
728
3.59k
    return Status::OK();
729
3.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
12.0k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
12.0k
    }
727
12.0k
    _closed = true;
728
12.0k
    return Status::OK();
729
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
323k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
323k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
323k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
323k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
323k
    }
727
323k
    _closed = true;
728
323k
    return Status::OK();
729
323k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
500k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
500k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
500k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
500k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
500k
    }
727
500k
    _closed = true;
728
500k
    return Status::OK();
729
500k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
14
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
14
    }
727
14
    _closed = true;
728
14
    return Status::OK();
729
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
302
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
302
    }
727
302
    _closed = true;
728
302
    return Status::OK();
729
302
}
730
731
template <typename LocalStateType>
732
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
733
11.6k
                                                          bool* eos) {
734
11.6k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
11.6k
    return pull(state, block, eos);
736
11.6k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
733
432
                                                          bool* eos) {
734
432
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
432
    return pull(state, block, eos);
736
432
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
733
11.2k
                                                          bool* eos) {
734
11.2k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
11.2k
    return pull(state, block, eos);
736
11.2k
}
737
738
template <typename LocalStateType>
739
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
740
681k
                                                         bool* eos) {
741
681k
    auto& local_state = get_local_state(state);
742
681k
    if (need_more_input_data(state)) {
743
653k
        local_state._child_block->clear_column_data(
744
653k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
653k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
653k
                state, local_state._child_block.get(), &local_state._child_eos));
747
653k
        *eos = local_state._child_eos;
748
653k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
53.0k
            return Status::OK();
750
53.0k
        }
751
600k
        {
752
600k
            SCOPED_TIMER(local_state.exec_time_counter());
753
600k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
600k
        }
755
600k
    }
756
757
627k
    if (!need_more_input_data(state)) {
758
582k
        SCOPED_TIMER(local_state.exec_time_counter());
759
582k
        bool new_eos = false;
760
582k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
582k
        if (new_eos) {
762
506k
            *eos = true;
763
506k
        } else if (!need_more_input_data(state)) {
764
22.8k
            *eos = false;
765
22.8k
        }
766
582k
    }
767
627k
    return Status::OK();
768
627k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
124k
                                                         bool* eos) {
741
124k
    auto& local_state = get_local_state(state);
742
124k
    if (need_more_input_data(state)) {
743
109k
        local_state._child_block->clear_column_data(
744
109k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
109k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
109k
                state, local_state._child_block.get(), &local_state._child_eos));
747
109k
        *eos = local_state._child_eos;
748
109k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
29.2k
            return Status::OK();
750
29.2k
        }
751
80.5k
        {
752
80.5k
            SCOPED_TIMER(local_state.exec_time_counter());
753
80.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
80.5k
        }
755
80.5k
    }
756
757
95.7k
    if (!need_more_input_data(state)) {
758
95.7k
        SCOPED_TIMER(local_state.exec_time_counter());
759
95.7k
        bool new_eos = false;
760
95.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
95.7k
        if (new_eos) {
762
42.7k
            *eos = true;
763
52.9k
        } else if (!need_more_input_data(state)) {
764
9.15k
            *eos = false;
765
9.15k
        }
766
95.7k
    }
767
95.6k
    return Status::OK();
768
95.6k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
2.78k
                                                         bool* eos) {
741
2.78k
    auto& local_state = get_local_state(state);
742
2.78k
    if (need_more_input_data(state)) {
743
1.59k
        local_state._child_block->clear_column_data(
744
1.59k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
1.59k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
1.59k
                state, local_state._child_block.get(), &local_state._child_eos));
747
1.59k
        *eos = local_state._child_eos;
748
1.59k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
129
            return Status::OK();
750
129
        }
751
1.46k
        {
752
1.46k
            SCOPED_TIMER(local_state.exec_time_counter());
753
1.46k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
1.46k
        }
755
1.46k
    }
756
757
2.67k
    if (!need_more_input_data(state)) {
758
2.67k
        SCOPED_TIMER(local_state.exec_time_counter());
759
2.67k
        bool new_eos = false;
760
2.67k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
2.67k
        if (new_eos) {
762
1.26k
            *eos = true;
763
1.40k
        } else if (!need_more_input_data(state)) {
764
1.19k
            *eos = false;
765
1.19k
        }
766
2.67k
    }
767
2.65k
    return Status::OK();
768
2.65k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
4.83k
                                                         bool* eos) {
741
4.83k
    auto& local_state = get_local_state(state);
742
4.83k
    if (need_more_input_data(state)) {
743
4.83k
        local_state._child_block->clear_column_data(
744
4.83k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
4.83k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
4.83k
                state, local_state._child_block.get(), &local_state._child_eos));
747
4.83k
        *eos = local_state._child_eos;
748
4.83k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
1.62k
            return Status::OK();
750
1.62k
        }
751
3.20k
        {
752
3.20k
            SCOPED_TIMER(local_state.exec_time_counter());
753
3.20k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
3.20k
        }
755
3.20k
    }
756
757
3.20k
    if (!need_more_input_data(state)) {
758
3.20k
        SCOPED_TIMER(local_state.exec_time_counter());
759
3.20k
        bool new_eos = false;
760
3.20k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
3.20k
        if (new_eos) {
762
1.64k
            *eos = true;
763
1.64k
        } else if (!need_more_input_data(state)) {
764
0
            *eos = false;
765
0
        }
766
3.20k
    }
767
3.20k
    return Status::OK();
768
3.20k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
28.2k
                                                         bool* eos) {
741
28.2k
    auto& local_state = get_local_state(state);
742
28.2k
    if (need_more_input_data(state)) {
743
28.2k
        local_state._child_block->clear_column_data(
744
28.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
28.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
28.2k
                state, local_state._child_block.get(), &local_state._child_eos));
747
28.2k
        *eos = local_state._child_eos;
748
28.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
3.07k
            return Status::OK();
750
3.07k
        }
751
25.2k
        {
752
25.2k
            SCOPED_TIMER(local_state.exec_time_counter());
753
25.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
25.2k
        }
755
25.2k
    }
756
757
25.2k
    if (!need_more_input_data(state)) {
758
10.5k
        SCOPED_TIMER(local_state.exec_time_counter());
759
10.5k
        bool new_eos = false;
760
10.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
10.5k
        if (new_eos) {
762
10.3k
            *eos = true;
763
10.3k
        } else if (!need_more_input_data(state)) {
764
5
            *eos = false;
765
5
        }
766
10.5k
    }
767
25.2k
    return Status::OK();
768
25.2k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
484k
                                                         bool* eos) {
741
484k
    auto& local_state = get_local_state(state);
742
485k
    if (need_more_input_data(state)) {
743
485k
        local_state._child_block->clear_column_data(
744
485k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
485k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
485k
                state, local_state._child_block.get(), &local_state._child_eos));
747
485k
        *eos = local_state._child_eos;
748
485k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
15.8k
            return Status::OK();
750
15.8k
        }
751
469k
        {
752
469k
            SCOPED_TIMER(local_state.exec_time_counter());
753
469k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
469k
        }
755
469k
    }
756
757
468k
    if (!need_more_input_data(state)) {
758
438k
        SCOPED_TIMER(local_state.exec_time_counter());
759
438k
        bool new_eos = false;
760
438k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
438k
        if (new_eos) {
762
436k
            *eos = true;
763
436k
        } else if (!need_more_input_data(state)) {
764
0
            *eos = false;
765
0
        }
766
438k
    }
767
468k
    return Status::OK();
768
468k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
28.5k
                                                         bool* eos) {
741
28.5k
    auto& local_state = get_local_state(state);
742
28.5k
    if (need_more_input_data(state)) {
743
16.4k
        local_state._child_block->clear_column_data(
744
16.4k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
16.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
16.4k
                state, local_state._child_block.get(), &local_state._child_eos));
747
16.4k
        *eos = local_state._child_eos;
748
16.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
2.40k
            return Status::OK();
750
2.40k
        }
751
14.0k
        {
752
14.0k
            SCOPED_TIMER(local_state.exec_time_counter());
753
14.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
14.0k
        }
755
14.0k
    }
756
757
26.1k
    if (!need_more_input_data(state)) {
758
25.6k
        SCOPED_TIMER(local_state.exec_time_counter());
759
25.6k
        bool new_eos = false;
760
25.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
25.6k
        if (new_eos) {
762
8.95k
            *eos = true;
763
16.7k
        } else if (!need_more_input_data(state)) {
764
12.1k
            *eos = false;
765
12.1k
        }
766
25.6k
    }
767
26.1k
    return Status::OK();
768
26.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
7.14k
                                                         bool* eos) {
741
7.14k
    auto& local_state = get_local_state(state);
742
7.14k
    if (need_more_input_data(state)) {
743
6.78k
        local_state._child_block->clear_column_data(
744
6.78k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
6.78k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
6.78k
                state, local_state._child_block.get(), &local_state._child_eos));
747
6.78k
        *eos = local_state._child_eos;
748
6.78k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
730
            return Status::OK();
750
730
        }
751
6.05k
        {
752
6.05k
            SCOPED_TIMER(local_state.exec_time_counter());
753
6.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
6.05k
        }
755
6.05k
    }
756
757
6.40k
    if (!need_more_input_data(state)) {
758
6.40k
        SCOPED_TIMER(local_state.exec_time_counter());
759
6.40k
        bool new_eos = false;
760
6.40k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
6.40k
        if (new_eos) {
762
4.41k
            *eos = true;
763
4.41k
        } else if (!need_more_input_data(state)) {
764
366
            *eos = false;
765
366
        }
766
6.40k
    }
767
6.40k
    return Status::OK();
768
6.40k
}
769
770
template <typename Writer, typename Parent>
771
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
772
64.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
64.1k
    RETURN_IF_ERROR(Base::init(state, info));
774
64.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
64.1k
                                                         "AsyncWriterDependency", true);
776
64.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
64.1k
                             _finish_dependency));
778
779
64.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
64.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
64.1k
    return Status::OK();
782
64.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
518
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
518
    RETURN_IF_ERROR(Base::init(state, info));
774
518
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
518
                                                         "AsyncWriterDependency", true);
776
518
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
518
                             _finish_dependency));
778
779
518
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
518
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
518
    return Status::OK();
782
518
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
88
    RETURN_IF_ERROR(Base::init(state, info));
774
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
88
                                                         "AsyncWriterDependency", true);
776
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
88
                             _finish_dependency));
778
779
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
88
    return Status::OK();
782
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
44.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
44.7k
    RETURN_IF_ERROR(Base::init(state, info));
774
44.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
44.7k
                                                         "AsyncWriterDependency", true);
776
44.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
44.7k
                             _finish_dependency));
778
779
44.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
44.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
44.7k
    return Status::OK();
782
44.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
9.29k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
9.29k
    RETURN_IF_ERROR(Base::init(state, info));
774
9.29k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
9.29k
                                                         "AsyncWriterDependency", true);
776
9.29k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
9.29k
                             _finish_dependency));
778
779
9.29k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
9.29k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
9.29k
    return Status::OK();
782
9.29k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
5.16k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
5.16k
    RETURN_IF_ERROR(Base::init(state, info));
774
5.16k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
5.16k
                                                         "AsyncWriterDependency", true);
776
5.16k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
5.16k
                             _finish_dependency));
778
779
5.16k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
5.16k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
5.16k
    return Status::OK();
782
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
774
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
3.38k
                                                         "AsyncWriterDependency", true);
776
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
3.38k
                             _finish_dependency));
778
779
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
3.38k
    return Status::OK();
782
3.38k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
32
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
32
    RETURN_IF_ERROR(Base::init(state, info));
774
32
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
32
                                                         "AsyncWriterDependency", true);
776
32
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
32
                             _finish_dependency));
778
779
32
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
32
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
32
    return Status::OK();
782
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
160
    RETURN_IF_ERROR(Base::init(state, info));
774
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
160
                                                         "AsyncWriterDependency", true);
776
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
160
                             _finish_dependency));
778
779
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
160
    return Status::OK();
782
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
640
    RETURN_IF_ERROR(Base::init(state, info));
774
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
640
                                                         "AsyncWriterDependency", true);
776
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
640
                             _finish_dependency));
778
779
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
640
    return Status::OK();
782
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
156
    RETURN_IF_ERROR(Base::init(state, info));
774
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
156
                                                         "AsyncWriterDependency", true);
776
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
156
                             _finish_dependency));
778
779
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
156
    return Status::OK();
782
156
}
783
784
template <typename Writer, typename Parent>
785
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
786
64.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
64.5k
    RETURN_IF_ERROR(Base::open(state));
788
64.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
577k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
512k
        RETURN_IF_ERROR(
791
512k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
512k
    }
793
64.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
64.5k
    return Status::OK();
795
64.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
518
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
518
    RETURN_IF_ERROR(Base::open(state));
788
518
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
2.78k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
2.26k
        RETURN_IF_ERROR(
791
2.26k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
2.26k
    }
793
518
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
518
    return Status::OK();
795
518
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
88
    RETURN_IF_ERROR(Base::open(state));
788
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
324
        RETURN_IF_ERROR(
791
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
324
    }
793
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
88
    return Status::OK();
795
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
45.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
45.1k
    RETURN_IF_ERROR(Base::open(state));
788
45.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
330k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
285k
        RETURN_IF_ERROR(
791
285k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
285k
    }
793
45.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
45.1k
    return Status::OK();
795
45.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
9.24k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
9.24k
    RETURN_IF_ERROR(Base::open(state));
788
9.24k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
57.8k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
48.5k
        RETURN_IF_ERROR(
791
48.5k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
48.5k
    }
793
9.24k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
9.24k
    return Status::OK();
795
9.24k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
5.15k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
5.15k
    RETURN_IF_ERROR(Base::open(state));
788
5.15k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
137k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
132k
        RETURN_IF_ERROR(
791
132k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
132k
    }
793
5.15k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
5.15k
    return Status::OK();
795
5.15k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
3.38k
    RETURN_IF_ERROR(Base::open(state));
788
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
42.2k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
38.8k
        RETURN_IF_ERROR(
791
38.8k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
38.8k
    }
793
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
3.38k
    return Status::OK();
795
3.38k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
32
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
32
    RETURN_IF_ERROR(Base::open(state));
788
32
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
128
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
96
        RETURN_IF_ERROR(
791
96
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
96
    }
793
32
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
32
    return Status::OK();
795
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
160
    RETURN_IF_ERROR(Base::open(state));
788
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
478
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
318
        RETURN_IF_ERROR(
791
318
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
318
    }
793
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
160
    return Status::OK();
795
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
640
    RETURN_IF_ERROR(Base::open(state));
788
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
4.39k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
3.75k
        RETURN_IF_ERROR(
791
3.75k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
3.75k
    }
793
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
640
    return Status::OK();
795
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
156
    RETURN_IF_ERROR(Base::open(state));
788
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
630
        RETURN_IF_ERROR(
791
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
630
    }
793
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
156
    return Status::OK();
795
156
}
796
797
template <typename Writer, typename Parent>
798
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
799
87.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
87.8k
    return _writer->sink(block, eos);
801
87.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
2.09k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
2.09k
    return _writer->sink(block, eos);
801
2.09k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
112
    return _writer->sink(block, eos);
801
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
60.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
60.6k
    return _writer->sink(block, eos);
801
60.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
10.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
10.7k
    return _writer->sink(block, eos);
801
10.7k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
7.52k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
7.52k
    return _writer->sink(block, eos);
801
7.52k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
5.36k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
5.36k
    return _writer->sink(block, eos);
801
5.36k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
40
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
40
    return _writer->sink(block, eos);
801
40
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
180
    return _writer->sink(block, eos);
801
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
800
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
800
    return _writer->sink(block, eos);
801
800
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
310
    return _writer->sink(block, eos);
801
310
}
802
803
template <typename Writer, typename Parent>
804
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
805
64.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
64.6k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
64.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
64.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
64.6k
    if (_writer) {
813
64.6k
        Status st = _writer->get_writer_status();
814
64.6k
        if (exec_status.ok()) {
815
64.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
64.5k
                                                       : Status::Cancelled("force close"));
817
64.5k
        } else {
818
108
            _writer->force_close(exec_status);
819
108
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
64.6k
        RETURN_IF_ERROR(st);
824
64.6k
    }
825
64.5k
    return Base::close(state, exec_status);
826
64.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
506
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
506
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
506
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
506
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
506
    if (_writer) {
813
506
        Status st = _writer->get_writer_status();
814
506
        if (exec_status.ok()) {
815
506
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
506
                                                       : Status::Cancelled("force close"));
817
506
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
506
        RETURN_IF_ERROR(st);
824
506
    }
825
506
    return Base::close(state, exec_status);
826
506
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
88
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
88
    if (_writer) {
813
88
        Status st = _writer->get_writer_status();
814
88
        if (exec_status.ok()) {
815
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
88
                                                       : Status::Cancelled("force close"));
817
88
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
88
        RETURN_IF_ERROR(st);
824
88
    }
825
80
    return Base::close(state, exec_status);
826
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
45.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
45.2k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
45.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
45.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
45.2k
    if (_writer) {
813
45.2k
        Status st = _writer->get_writer_status();
814
45.2k
        if (exec_status.ok()) {
815
45.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
45.1k
                                                       : Status::Cancelled("force close"));
817
45.1k
        } else {
818
64
            _writer->force_close(exec_status);
819
64
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
45.2k
        RETURN_IF_ERROR(st);
824
45.2k
    }
825
45.1k
    return Base::close(state, exec_status);
826
45.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
9.27k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
9.27k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
9.27k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
9.27k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
9.29k
    if (_writer) {
813
9.29k
        Status st = _writer->get_writer_status();
814
9.29k
        if (exec_status.ok()) {
815
9.24k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
9.24k
                                                       : Status::Cancelled("force close"));
817
9.24k
        } else {
818
46
            _writer->force_close(exec_status);
819
46
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
9.29k
        RETURN_IF_ERROR(st);
824
9.29k
    }
825
9.27k
    return Base::close(state, exec_status);
826
9.27k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
5.16k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
5.16k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
5.16k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
5.16k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
5.16k
    if (_writer) {
813
5.16k
        Status st = _writer->get_writer_status();
814
5.16k
        if (exec_status.ok()) {
815
5.16k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
5.16k
                                                       : Status::Cancelled("force close"));
817
18.4E
        } else {
818
18.4E
            _writer->force_close(exec_status);
819
18.4E
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
5.16k
        RETURN_IF_ERROR(st);
824
5.16k
    }
825
5.16k
    return Base::close(state, exec_status);
826
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
3.38k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
3.38k
    if (_writer) {
813
3.38k
        Status st = _writer->get_writer_status();
814
3.38k
        if (exec_status.ok()) {
815
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
3.38k
                                                       : Status::Cancelled("force close"));
817
3.38k
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
3.38k
        RETURN_IF_ERROR(st);
824
3.38k
    }
825
3.38k
    return Base::close(state, exec_status);
826
3.38k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
32
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
32
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
32
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
32
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
32
    if (_writer) {
813
32
        Status st = _writer->get_writer_status();
814
32
        if (exec_status.ok()) {
815
32
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
32
                                                       : Status::Cancelled("force close"));
817
32
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
32
        RETURN_IF_ERROR(st);
824
32
    }
825
32
    return Base::close(state, exec_status);
826
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
160
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
160
    if (_writer) {
813
160
        Status st = _writer->get_writer_status();
814
160
        if (exec_status.ok()) {
815
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
160
                                                       : Status::Cancelled("force close"));
817
160
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
160
        RETURN_IF_ERROR(st);
824
160
    }
825
160
    return Base::close(state, exec_status);
826
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
640
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
640
    if (_writer) {
813
640
        Status st = _writer->get_writer_status();
814
640
        if (exec_status.ok()) {
815
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
640
                                                       : Status::Cancelled("force close"));
817
640
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
640
        RETURN_IF_ERROR(st);
824
640
    }
825
640
    return Base::close(state, exec_status);
826
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
156
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
156
    if (_writer) {
813
156
        Status st = _writer->get_writer_status();
814
156
        if (exec_status.ok()) {
815
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
156
                                                       : Status::Cancelled("force close"));
817
156
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
156
        RETURN_IF_ERROR(st);
824
156
    }
825
156
    return Base::close(state, exec_status);
826
156
}
827
828
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
829
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
830
DECLARE_OPERATOR(ResultSinkLocalState)
831
DECLARE_OPERATOR(JdbcTableSinkLocalState)
832
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
833
DECLARE_OPERATOR(ResultFileSinkLocalState)
834
DECLARE_OPERATOR(OlapTableSinkLocalState)
835
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
836
DECLARE_OPERATOR(HiveTableSinkLocalState)
837
DECLARE_OPERATOR(TVFTableSinkLocalState)
838
DECLARE_OPERATOR(IcebergTableSinkLocalState)
839
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
840
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
841
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
842
DECLARE_OPERATOR(MCTableSinkLocalState)
843
DECLARE_OPERATOR(AnalyticSinkLocalState)
844
DECLARE_OPERATOR(BlackholeSinkLocalState)
845
DECLARE_OPERATOR(SortSinkLocalState)
846
DECLARE_OPERATOR(SpillSortSinkLocalState)
847
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
848
DECLARE_OPERATOR(AggSinkLocalState)
849
DECLARE_OPERATOR(BucketedAggSinkLocalState)
850
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
851
DECLARE_OPERATOR(ExchangeSinkLocalState)
852
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
853
DECLARE_OPERATOR(UnionSinkLocalState)
854
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
855
DECLARE_OPERATOR(PartitionSortSinkLocalState)
856
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
857
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
858
DECLARE_OPERATOR(SetSinkLocalState<true>)
859
DECLARE_OPERATOR(SetSinkLocalState<false>)
860
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
861
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
862
DECLARE_OPERATOR(CacheSinkLocalState)
863
DECLARE_OPERATOR(DictSinkLocalState)
864
DECLARE_OPERATOR(RecCTESinkLocalState)
865
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
866
867
#undef DECLARE_OPERATOR
868
869
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
870
DECLARE_OPERATOR(HashJoinProbeLocalState)
871
DECLARE_OPERATOR(OlapScanLocalState)
872
DECLARE_OPERATOR(GroupCommitLocalState)
873
DECLARE_OPERATOR(JDBCScanLocalState)
874
DECLARE_OPERATOR(FileScanLocalState)
875
DECLARE_OPERATOR(AnalyticLocalState)
876
DECLARE_OPERATOR(SortLocalState)
877
DECLARE_OPERATOR(SpillSortLocalState)
878
DECLARE_OPERATOR(LocalMergeSortLocalState)
879
DECLARE_OPERATOR(AggLocalState)
880
DECLARE_OPERATOR(BucketedAggLocalState)
881
DECLARE_OPERATOR(PartitionedAggLocalState)
882
DECLARE_OPERATOR(TableFunctionLocalState)
883
DECLARE_OPERATOR(ExchangeLocalState)
884
DECLARE_OPERATOR(RepeatLocalState)
885
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
886
DECLARE_OPERATOR(AssertNumRowsLocalState)
887
DECLARE_OPERATOR(EmptySetLocalState)
888
DECLARE_OPERATOR(UnionSourceLocalState)
889
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
890
DECLARE_OPERATOR(PartitionSortSourceLocalState)
891
DECLARE_OPERATOR(SetSourceLocalState<true>)
892
DECLARE_OPERATOR(SetSourceLocalState<false>)
893
DECLARE_OPERATOR(DataGenLocalState)
894
DECLARE_OPERATOR(SchemaScanLocalState)
895
DECLARE_OPERATOR(MetaScanLocalState)
896
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
897
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
898
DECLARE_OPERATOR(CacheSourceLocalState)
899
DECLARE_OPERATOR(RecCTESourceLocalState)
900
DECLARE_OPERATOR(RecCTEScanLocalState)
901
902
#ifdef BE_TEST
903
DECLARE_OPERATOR(MockLocalState)
904
DECLARE_OPERATOR(MockScanLocalState)
905
#endif
906
#undef DECLARE_OPERATOR
907
908
template class StreamingOperatorX<AssertNumRowsLocalState>;
909
template class StreamingOperatorX<SelectLocalState>;
910
911
template class StatefulOperatorX<HashJoinProbeLocalState>;
912
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
913
template class StatefulOperatorX<RepeatLocalState>;
914
template class StatefulOperatorX<MaterializationLocalState>;
915
template class StatefulOperatorX<StreamingAggLocalState>;
916
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
917
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
918
template class StatefulOperatorX<TableFunctionLocalState>;
919
920
template class PipelineXSinkLocalState<HashJoinSharedState>;
921
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
922
template class PipelineXSinkLocalState<SortSharedState>;
923
template class PipelineXSinkLocalState<SpillSortSharedState>;
924
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
925
template class PipelineXSinkLocalState<AnalyticSharedState>;
926
template class PipelineXSinkLocalState<AggSharedState>;
927
template class PipelineXSinkLocalState<BucketedAggSharedState>;
928
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
929
template class PipelineXSinkLocalState<FakeSharedState>;
930
template class PipelineXSinkLocalState<UnionSharedState>;
931
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
932
template class PipelineXSinkLocalState<MultiCastSharedState>;
933
template class PipelineXSinkLocalState<SetSharedState>;
934
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
935
template class PipelineXSinkLocalState<BasicSharedState>;
936
template class PipelineXSinkLocalState<DataQueueSharedState>;
937
template class PipelineXSinkLocalState<RecCTESharedState>;
938
939
template class PipelineXLocalState<HashJoinSharedState>;
940
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
941
template class PipelineXLocalState<SortSharedState>;
942
template class PipelineXLocalState<SpillSortSharedState>;
943
template class PipelineXLocalState<NestedLoopJoinSharedState>;
944
template class PipelineXLocalState<AnalyticSharedState>;
945
template class PipelineXLocalState<AggSharedState>;
946
template class PipelineXLocalState<BucketedAggSharedState>;
947
template class PipelineXLocalState<PartitionedAggSharedState>;
948
template class PipelineXLocalState<FakeSharedState>;
949
template class PipelineXLocalState<UnionSharedState>;
950
template class PipelineXLocalState<DataQueueSharedState>;
951
template class PipelineXLocalState<MultiCastSharedState>;
952
template class PipelineXLocalState<PartitionSortNodeSharedState>;
953
template class PipelineXLocalState<SetSharedState>;
954
template class PipelineXLocalState<LocalExchangeSharedState>;
955
template class PipelineXLocalState<BasicSharedState>;
956
template class PipelineXLocalState<RecCTESharedState>;
957
958
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
959
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
960
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
962
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
964
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
965
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
966
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
967
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
968
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
969
970
#ifdef BE_TEST
971
template class OperatorX<DummyOperatorLocalState>;
972
template class DataSinkOperatorX<DummySinkLocalState>;
973
#endif
974
975
} // namespace doris