Coverage Report

Created: 2026-10-14 21:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
2.02M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
2.02M
    if (_parent->nereids_id() == -1) {
123
1.07M
        return fmt::format("(id={})", _parent->node_id());
124
1.07M
    } else {
125
946k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
946k
    }
127
2.02M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
66.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
66.7k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
66.7k
    } else {
125
66.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
66.7k
    }
127
66.7k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
211k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
211k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
211k
    } else {
125
211k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
211k
    }
127
211k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
24
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
24
    } else {
125
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
24
    }
127
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.71k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.71k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.71k
    } else {
125
5.71k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.71k
    }
127
5.71k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.15k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.15k
    if (_parent->nereids_id() == -1) {
123
16
        return fmt::format("(id={})", _parent->node_id());
124
9.14k
    } else {
125
9.14k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.14k
    }
127
9.15k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
98.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
98.2k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
98.1k
    } else {
125
98.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
98.1k
    }
127
98.2k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
48.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
48.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
48.3k
    } else {
125
48.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
48.3k
    }
127
48.3k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
72
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
72
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
72
    } else {
125
72
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
72
    }
127
72
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
791k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
791k
    if (_parent->nereids_id() == -1) {
123
340k
        return fmt::format("(id={})", _parent->node_id());
124
450k
    } else {
125
450k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
450k
    }
127
791k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
54.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
54.9k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
54.9k
    } else {
125
54.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
54.9k
    }
127
54.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.44k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.44k
    if (_parent->nereids_id() == -1) {
123
4.44k
        return fmt::format("(id={})", _parent->node_id());
124
4.44k
    } else {
125
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1
    }
127
4.44k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
462
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
462
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
360
    } else {
125
360
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
360
    }
127
462
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.14k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.14k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.13k
    } else {
125
5.13k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.13k
    }
127
5.14k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
726k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
730k
    if (_parent->nereids_id() == -1) {
123
730k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
726k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.29M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.29M
    if (_parent->nereids_id() == -1) {
132
790k
        return fmt::format("(id={})", _parent->node_id());
133
790k
    } else {
134
500k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
500k
    }
136
1.29M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
115k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
115k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
115k
    } else {
134
115k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
115k
    }
136
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
214k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
214k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
214k
    } else {
134
214k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
214k
    }
136
214k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
31
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
31
    } else {
134
31
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
31
    }
136
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.75k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.75k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.75k
    } else {
134
5.75k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.75k
    }
136
5.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.19k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.19k
    if (_parent->nereids_id() == -1) {
132
16
        return fmt::format("(id={})", _parent->node_id());
133
9.17k
    } else {
134
9.17k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.17k
    }
136
9.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
98.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
98.6k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
98.6k
    } else {
134
98.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
98.6k
    }
136
98.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
48.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
48.2k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
48.2k
    } else {
134
48.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
48.2k
    }
136
48.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
82
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
82
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
82
    } else {
134
82
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
82
    }
136
82
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6
    if (_parent->nereids_id() == -1) {
132
6
        return fmt::format("(id={})", _parent->node_id());
133
6
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
6
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.87k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.87k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
8.87k
    } else {
134
8.87k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.87k
    }
136
8.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
463
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
463
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
361
    } else {
134
361
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
361
    }
136
463
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.0k
    if (_parent->nereids_id() == -1) {
132
13.0k
        return fmt::format("(id={})", _parent->node_id());
133
13.0k
    } else {
134
23
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
23
    }
136
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
308k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
309k
    if (_parent->nereids_id() == -1) {
132
309k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
308k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
467k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
467k
    if (_parent->nereids_id() == -1) {
132
467k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
467k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
32.3k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.3k
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
32.3k
    _terminated = true;
144
32.3k
    return Status::OK();
145
32.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3.34k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.34k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.34k
    _terminated = true;
144
3.34k
    return Status::OK();
145
3.34k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
7
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
7
    _terminated = true;
144
7
    return Status::OK();
145
7
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.25k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.25k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.25k
    _terminated = true;
144
2.25k
    return Status::OK();
145
2.25k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.17k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.17k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.17k
    _terminated = true;
144
1.17k
    return Status::OK();
145
1.17k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
692
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
692
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
691
    _terminated = true;
144
691
    return Status::OK();
145
692
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
290
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
290
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
290
    _terminated = true;
144
290
    return Status::OK();
145
290
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
94
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
94
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
94
    _terminated = true;
144
94
    return Status::OK();
145
94
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
13
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
13
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
13
    _terminated = true;
144
13
    return Status::OK();
145
13
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
312
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
312
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
312
    _terminated = true;
144
312
    return Status::OK();
145
312
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
131
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
131
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
131
    _terminated = true;
144
131
    return Status::OK();
145
131
}
146
147
319k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
319k
    return _child && _child->is_serial_operator() && !is_source()
149
319k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
319k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
319k
}
152
153
27.4k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
27.4k
    if (!_child) {
155
26.5k
        return false;
156
26.5k
    }
157
925
    if (_child->is_serial_operator()) {
158
96
        return true;
159
96
    }
160
829
    const auto child_distribution = _child->required_data_distribution(state);
161
829
    return child_distribution.need_local_exchange() &&
162
829
           !is_shuffled_exchange(child_distribution.distribution_type);
163
925
}
164
165
template <typename SharedStateArg>
166
12.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
12.8k
    fmt::memory_buffer debug_string_buffer;
168
12.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
12.8k
    return fmt::to_string(debug_string_buffer);
170
12.8k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
12.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
12.8k
    fmt::memory_buffer debug_string_buffer;
168
12.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
12.8k
    return fmt::to_string(debug_string_buffer);
170
12.8k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
12.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
12.8k
    fmt::memory_buffer debug_string_buffer;
175
12.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
12.8k
    return fmt::to_string(debug_string_buffer);
177
12.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
12.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
12.8k
    fmt::memory_buffer debug_string_buffer;
175
12.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
12.8k
    return fmt::to_string(debug_string_buffer);
177
12.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
12.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
12.8k
    fmt::memory_buffer debug_string_buffer;
181
12.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
12.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
12.8k
                   _is_serial_operator);
184
12.8k
    return fmt::to_string(debug_string_buffer);
185
12.8k
}
186
187
12.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
12.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
12.8k
}
190
191
701k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
701k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
701k
    _nereids_id = tnode.nereids_id;
194
701k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.61k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.61k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.61k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.61k
    }
207
701k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
701k
    _op_name = substr + "_OPERATOR";
209
210
701k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
701k
    } else if (tnode.__isset.conjuncts) {
213
279k
        for (const auto& conjunct : tnode.conjuncts) {
214
279k
            VExprContextSPtr context;
215
279k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
279k
            _conjuncts.emplace_back(context);
217
279k
        }
218
103k
    }
219
220
    // create the projections expr
221
701k
    if (tnode.__isset.projections) {
222
273k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
273k
    }
224
701k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.61k
        DCHECK(has_projection()) << "no final projections";
226
6.61k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
11.7k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
11.7k
            VExprContextSPtrs projections;
229
11.7k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
11.7k
            _projection->intermediate_projections.push_back(projections);
231
11.7k
        }
232
6.61k
    }
233
701k
    return Status::OK();
234
701k
}
235
236
728k
Status OperatorXBase::prepare(RuntimeState* state) {
237
728k
    for (auto& conjunct : _conjuncts) {
238
279k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
279k
    }
240
728k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
678k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
343k
            return a->execute_cost() < b->execute_cost();
243
343k
        });
244
678k
    };
245
246
728k
    if (has_projection()) {
247
272k
        auto& projection = *_projection;
248
284k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
11.7k
            const auto& input_row_desc =
250
11.7k
                    i == 0 ? operator_row_desc_before_projection()
251
11.7k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
11.7k
            RETURN_IF_ERROR(
253
11.7k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
11.7k
        }
255
272k
        const auto& final_projection_input_row_desc =
256
272k
                projection.intermediate_output_row_descriptors.empty()
257
272k
                        ? operator_row_desc_before_projection()
258
272k
                        : projection.intermediate_output_row_descriptors.back();
259
272k
        RETURN_IF_ERROR(
260
272k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
272k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
272k
                                                      projection.output_row_descriptor));
263
272k
    }
264
265
728k
    for (auto& conjunct : _conjuncts) {
266
279k
        RETURN_IF_ERROR(conjunct->open(state));
267
279k
    }
268
728k
    if (has_projection()) {
269
272k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
272k
        for (auto& projections : _projection->intermediate_projections) {
271
11.7k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
11.7k
        }
273
272k
    }
274
728k
    if (_child && !is_source()) {
275
105k
        RETURN_IF_ERROR(_child->prepare(state));
276
105k
    }
277
278
728k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
729k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
728k
    return Status::OK();
284
728k
}
285
286
9.23k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.23k
    if (_child && !is_source()) {
288
880
        RETURN_IF_ERROR(_child->terminate(state));
289
880
    }
290
9.23k
    auto result = state->get_local_state_result(operator_id());
291
9.23k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.23k
    return result.value()->terminate(state);
295
9.23k
}
296
297
5.58M
Status OperatorXBase::close(RuntimeState* state) {
298
5.58M
    if (_child && !is_source()) {
299
1.02M
        RETURN_IF_ERROR(_child->close(state));
300
1.02M
    }
301
5.58M
    auto result = state->get_local_state_result(operator_id());
302
5.58M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.58M
    return result.value()->close(state);
306
5.58M
}
307
308
286k
void PipelineXLocalStateBase::clear_origin_block() {
309
286k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
286k
}
311
312
754k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
754k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
754k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
754k
    return Status::OK();
317
754k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
286k
                                     Block* output_block) const {
326
286k
    auto* local_state = state->get_local_state(operator_id());
327
286k
    SCOPED_TIMER(local_state->exec_time_counter());
328
286k
    SCOPED_TIMER(local_state->_projection_timer);
329
286k
    const size_t rows = origin_block->rows();
330
286k
    if (rows == 0) {
331
147k
        return Status::OK();
332
147k
    }
333
139k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
139k
    {
336
139k
        Block input_block = *origin_block;
337
338
139k
        ColumnsWithTypeAndName new_columns;
339
139k
        for (const auto& projections : local_state->_intermediate_projections) {
340
4.63k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
4.63k
            new_columns.resize(projections.size());
345
79.3k
            for (int i = 0; i < projections.size(); i++) {
346
74.6k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
74.6k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
74.6k
            }
355
4.62k
            Block tmp_block {new_columns};
356
4.62k
            input_block.swap(tmp_block);
357
4.62k
        }
358
359
138k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
138k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
138k
                output_block, _projection->output_row_descriptor);
368
138k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
138k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
138k
        Columns shared_columns(mutable_columns.size());
371
372
780k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
641k
            ColumnPtr column_ptr;
374
641k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
641k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
641k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
641k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
641k
            if (column_ptr->is_exclusive()) {
386
234k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
407k
            } else {
388
407k
                shared_columns[i] = std::move(column_ptr);
389
407k
            }
390
641k
        }
391
392
138k
        scoped_mutable_block.restore();
393
780k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
641k
            if (shared_columns[i]) {
395
407k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
407k
            }
397
641k
        }
398
138k
    }
399
400
0
    origin_block->clear_column_data(
401
138k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
138k
    DCHECK_EQ(output_block->rows(), rows);
403
404
138k
    return Status::OK();
405
138k
}
406
407
4.27M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.27M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.27M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.27M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.27M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.27M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.27M
            if (_debug_point_count++ % 2 == 0) {
414
4.27M
                return Status::OK();
415
4.27M
            }
416
4.27M
        }
417
4.27M
    });
418
419
4.27M
    Status status;
420
4.27M
    auto* local_state = state->get_local_state(operator_id());
421
4.27M
    Defer defer([&]() {
422
4.27M
        if (status.ok()) {
423
4.27M
            local_state->update_output_block_counters(*block);
424
4.27M
        }
425
4.27M
    });
426
4.27M
    if (has_projection()) {
427
286k
        local_state->clear_origin_block();
428
286k
        status = get_block(state, &local_state->_origin_block, eos);
429
286k
        if (UNLIKELY(!status.ok())) {
430
27
            return status;
431
27
        }
432
286k
        status = do_projections(state, &local_state->_origin_block, block);
433
286k
        return status;
434
286k
    }
435
3.98M
    status = get_block(state, block, eos);
436
3.98M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.98M
    return status;
438
3.98M
}
439
440
2.73M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.73M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.81k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.81k
        *eos = true;
444
9.81k
    }
445
446
2.73M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.73M
        auto op_name = to_lower(_parent->_op_name);
448
2.73M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.73M
        arg_op_name = to_lower(arg_op_name);
450
451
2.73M
        if (op_name == arg_op_name) {
452
2.73M
            *eos = true;
453
2.73M
        }
454
2.73M
    });
455
456
2.73M
    if (auto rows = block->rows()) {
457
758k
        _num_rows_returned += rows;
458
758k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
758k
    }
460
2.73M
}
461
462
32.3k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.3k
    auto result = state->get_sink_local_state_result();
464
32.3k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.3k
    return result.value()->terminate(state);
468
32.3k
}
469
470
12.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
12.8k
    fmt::memory_buffer debug_string_buffer;
472
473
12.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
12.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
12.8k
    return fmt::to_string(debug_string_buffer);
476
12.8k
}
477
478
12.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
12.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
12.8k
}
481
482
363k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
363k
    std::string op_name = "UNKNOWN_SINK";
484
363k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
364k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
364k
        op_name = it->second;
488
364k
    }
489
363k
    _name = op_name + "_OPERATOR";
490
363k
    return Status::OK();
491
363k
}
492
493
305k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
305k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
305k
    _nereids_id = tnode.nereids_id;
496
305k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
305k
    _name = substr + "_SINK_OPERATOR";
498
305k
    return Status::OK();
499
305k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.86M
                                                            LocalSinkStateInfo& info) {
504
1.86M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.86M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.86M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.86M
    return Status::OK();
508
1.86M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
115k
                                                            LocalSinkStateInfo& info) {
504
115k
    auto local_state = LocalStateType::create_unique(this, state);
505
115k
    RETURN_IF_ERROR(local_state->init(state, info));
506
115k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
115k
    return Status::OK();
508
115k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
421k
                                                            LocalSinkStateInfo& info) {
504
421k
    auto local_state = LocalStateType::create_unique(this, state);
505
421k
    RETURN_IF_ERROR(local_state->init(state, info));
506
421k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
421k
    return Status::OK();
508
421k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
356
                                                            LocalSinkStateInfo& info) {
504
356
    auto local_state = LocalStateType::create_unique(this, state);
505
356
    RETURN_IF_ERROR(local_state->init(state, info));
506
356
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
356
    return Status::OK();
508
356
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48.2k
                                                            LocalSinkStateInfo& info) {
504
48.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
48.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
48.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48.2k
    return Status::OK();
508
48.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.19k
                                                            LocalSinkStateInfo& info) {
504
9.19k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.19k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.19k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.19k
    return Status::OK();
508
9.19k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
215k
                                                            LocalSinkStateInfo& info) {
504
215k
    auto local_state = LocalStateType::create_unique(this, state);
505
215k
    RETURN_IF_ERROR(local_state->init(state, info));
506
215k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
215k
    return Status::OK();
508
215k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
31
                                                            LocalSinkStateInfo& info) {
504
31
    auto local_state = LocalStateType::create_unique(this, state);
505
31
    RETURN_IF_ERROR(local_state->init(state, info));
506
31
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
31
    return Status::OK();
508
31
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
310k
                                                            LocalSinkStateInfo& info) {
504
310k
    auto local_state = LocalStateType::create_unique(this, state);
505
310k
    RETURN_IF_ERROR(local_state->init(state, info));
506
310k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
310k
    return Status::OK();
508
310k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
99.0k
                                                            LocalSinkStateInfo& info) {
504
99.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
99.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
99.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
99.0k
    return Status::OK();
508
99.0k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48.4k
                                                            LocalSinkStateInfo& info) {
504
48.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
48.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
48.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48.4k
    return Status::OK();
508
48.4k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
82
                                                            LocalSinkStateInfo& info) {
504
82
    auto local_state = LocalStateType::create_unique(this, state);
505
82
    RETURN_IF_ERROR(local_state->init(state, info));
506
82
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
82
    return Status::OK();
508
82
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
568k
                                                            LocalSinkStateInfo& info) {
504
568k
    auto local_state = LocalStateType::create_unique(this, state);
505
568k
    RETURN_IF_ERROR(local_state->init(state, info));
506
568k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
568k
    return Status::OK();
508
568k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.76k
                                                            LocalSinkStateInfo& info) {
504
5.76k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.76k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.76k
    return Status::OK();
508
5.76k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.88k
                                                            LocalSinkStateInfo& info) {
504
8.88k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.88k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.88k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.88k
    return Status::OK();
508
8.88k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.78k
                                                            LocalSinkStateInfo& info) {
504
1.78k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.78k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.78k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.78k
    return Status::OK();
508
1.78k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
362
                                                            LocalSinkStateInfo& info) {
504
362
    auto local_state = LocalStateType::create_unique(this, state);
505
362
    RETURN_IF_ERROR(local_state->init(state, info));
506
362
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
362
    return Status::OK();
508
362
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.98k
                                                            LocalSinkStateInfo& info) {
504
4.98k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.98k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.98k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.98k
    return Status::OK();
508
4.98k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.79k
                                                            LocalSinkStateInfo& info) {
504
2.79k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.79k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.79k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.79k
    return Status::OK();
508
2.79k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.66k
                                                            LocalSinkStateInfo& info) {
504
2.66k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.66k
    return Status::OK();
508
2.66k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.61k
                                                            LocalSinkStateInfo& info) {
504
2.61k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.61k
    return Status::OK();
508
2.61k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
569
                                                            LocalSinkStateInfo& info) {
504
569
    auto local_state = LocalStateType::create_unique(this, state);
505
569
    RETURN_IF_ERROR(local_state->init(state, info));
506
569
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
569
    return Status::OK();
508
569
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.48M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.48M
    } else {
519
1.48M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.48M
        ss->id = operator_id();
521
1.48M
        for (auto& dest : dests_id()) {
522
1.47M
            ss->related_op_ids.insert(dest);
523
1.47M
        }
524
1.48M
        return ss;
525
1.48M
    }
526
1.48M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
422k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
422k
    } else {
519
422k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
422k
        ss->id = operator_id();
521
422k
        for (auto& dest : dests_id()) {
522
418k
            ss->related_op_ids.insert(dest);
523
418k
        }
524
422k
        return ss;
525
422k
    }
526
422k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
356
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
356
    } else {
519
356
        auto ss = LocalStateType::SharedStateType::create_shared();
520
356
        ss->id = operator_id();
521
356
        for (auto& dest : dests_id()) {
522
355
            ss->related_op_ids.insert(dest);
523
355
        }
524
356
        return ss;
525
356
    }
526
356
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
48.3k
    } else {
519
48.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48.3k
        ss->id = operator_id();
521
48.3k
        for (auto& dest : dests_id()) {
522
48.0k
            ss->related_op_ids.insert(dest);
523
48.0k
        }
524
48.3k
        return ss;
525
48.3k
    }
526
48.3k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
14
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
14
    } else {
519
14
        auto ss = LocalStateType::SharedStateType::create_shared();
520
14
        ss->id = operator_id();
521
14
        for (auto& dest : dests_id()) {
522
14
            ss->related_op_ids.insert(dest);
523
14
        }
524
14
        return ss;
525
14
    }
526
14
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.21k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.21k
    } else {
519
9.21k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.21k
        ss->id = operator_id();
521
9.21k
        for (auto& dest : dests_id()) {
522
9.20k
            ss->related_op_ids.insert(dest);
523
9.20k
        }
524
9.21k
        return ss;
525
9.21k
    }
526
9.21k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
216k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
216k
    } else {
519
216k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
216k
        ss->id = operator_id();
521
216k
        for (auto& dest : dests_id()) {
522
215k
            ss->related_op_ids.insert(dest);
523
215k
        }
524
216k
        return ss;
525
216k
    }
526
216k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
33
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
33
    } else {
519
33
        auto ss = LocalStateType::SharedStateType::create_shared();
520
33
        ss->id = operator_id();
521
33
        for (auto& dest : dests_id()) {
522
33
            ss->related_op_ids.insert(dest);
523
33
        }
524
33
        return ss;
525
33
    }
526
33
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
99.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
99.3k
    } else {
519
99.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
99.3k
        ss->id = operator_id();
521
99.3k
        for (auto& dest : dests_id()) {
522
99.0k
            ss->related_op_ids.insert(dest);
523
99.0k
        }
524
99.3k
        return ss;
525
99.3k
    }
526
99.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
81
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
81
    } else {
519
81
        auto ss = LocalStateType::SharedStateType::create_shared();
520
81
        ss->id = operator_id();
521
81
        for (auto& dest : dests_id()) {
522
81
            ss->related_op_ids.insert(dest);
523
81
        }
524
81
        return ss;
525
81
    }
526
81
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
569k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
569k
    } else {
519
569k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
569k
        ss->id = operator_id();
521
569k
        for (auto& dest : dests_id()) {
522
563k
            ss->related_op_ids.insert(dest);
523
563k
        }
524
569k
        return ss;
525
569k
    }
526
569k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.76k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.76k
    } else {
519
5.76k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.76k
        ss->id = operator_id();
521
5.76k
        for (auto& dest : dests_id()) {
522
5.74k
            ss->related_op_ids.insert(dest);
523
5.74k
        }
524
5.76k
        return ss;
525
5.76k
    }
526
5.76k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
465
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
465
    } else {
519
465
        auto ss = LocalStateType::SharedStateType::create_shared();
520
465
        ss->id = operator_id();
521
465
        for (auto& dest : dests_id()) {
522
465
            ss->related_op_ids.insert(dest);
523
465
        }
524
465
        return ss;
525
465
    }
526
465
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.67k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.67k
    } else {
519
2.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.67k
        ss->id = operator_id();
521
2.67k
        for (auto& dest : dests_id()) {
522
2.64k
            ss->related_op_ids.insert(dest);
523
2.64k
        }
524
2.67k
        return ss;
525
2.67k
    }
526
2.67k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.62k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.62k
    } else {
519
2.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.62k
        ss->id = operator_id();
521
2.62k
        for (auto& dest : dests_id()) {
522
2.60k
            ss->related_op_ids.insert(dest);
523
2.60k
        }
524
2.62k
        return ss;
525
2.62k
    }
526
2.62k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
570
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
570
    } else {
519
570
        auto ss = LocalStateType::SharedStateType::create_shared();
520
570
        ss->id = operator_id();
521
570
        for (auto& dest : dests_id()) {
522
556
            ss->related_op_ids.insert(dest);
523
556
        }
524
570
        return ss;
525
570
    }
526
570
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.30M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.30M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.30M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.30M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.30M
    return Status::OK();
534
2.30M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
67.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
67.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
67.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
67.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
67.0k
    return Status::OK();
534
67.0k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
257k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
257k
    auto local_state = LocalStateType::create_unique(state, this);
531
257k
    RETURN_IF_ERROR(local_state->init(state, info));
532
257k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
257k
    return Status::OK();
534
257k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
137
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
137
    auto local_state = LocalStateType::create_unique(state, this);
531
137
    RETURN_IF_ERROR(local_state->init(state, info));
532
137
    state->emplace_local_state(operator_id(), std::move(local_state));
533
137
    return Status::OK();
534
137
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.21k
    return Status::OK();
534
3.21k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.19k
    return Status::OK();
534
9.19k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.39k
    return Status::OK();
534
8.39k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
24
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
24
    auto local_state = LocalStateType::create_unique(state, this);
531
24
    RETURN_IF_ERROR(local_state->init(state, info));
532
24
    state->emplace_local_state(operator_id(), std::move(local_state));
533
24
    return Status::OK();
534
24
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
207k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
207k
    auto local_state = LocalStateType::create_unique(state, this);
531
207k
    RETURN_IF_ERROR(local_state->init(state, info));
532
207k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
207k
    return Status::OK();
534
207k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
98.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
98.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
98.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
98.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
98.9k
    return Status::OK();
534
98.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
48.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
48.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
48.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
48.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
48.4k
    return Status::OK();
534
48.4k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
72
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
72
    auto local_state = LocalStateType::create_unique(state, this);
531
72
    RETURN_IF_ERROR(local_state->init(state, info));
532
72
    state->emplace_local_state(operator_id(), std::move(local_state));
533
72
    return Status::OK();
534
72
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.31k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.31k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.31k
    return Status::OK();
534
5.31k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
343k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
343k
    auto local_state = LocalStateType::create_unique(state, this);
531
343k
    RETURN_IF_ERROR(local_state->init(state, info));
532
343k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
343k
    return Status::OK();
534
343k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.30k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.30k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.30k
    return Status::OK();
534
1.30k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.75k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.75k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.75k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.75k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.75k
    return Status::OK();
534
5.75k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.56k
    return Status::OK();
534
1.56k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.4k
    return Status::OK();
534
55.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.45k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.45k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.45k
    return Status::OK();
534
4.45k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
362
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
362
    auto local_state = LocalStateType::create_unique(state, this);
531
362
    RETURN_IF_ERROR(local_state->init(state, info));
532
362
    state->emplace_local_state(operator_id(), std::move(local_state));
533
362
    return Status::OK();
534
362
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.65k
    return Status::OK();
534
2.65k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.61k
    return Status::OK();
534
2.61k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
502
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
502
    auto local_state = LocalStateType::create_unique(state, this);
531
502
    RETURN_IF_ERROR(local_state->init(state, info));
532
502
    state->emplace_local_state(operator_id(), std::move(local_state));
533
502
    return Status::OK();
534
502
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.69k
    return Status::OK();
534
1.69k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.6k
    return Status::OK();
534
10.6k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
736k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
736k
    auto local_state = LocalStateType::create_unique(state, this);
531
736k
    RETURN_IF_ERROR(local_state->init(state, info));
532
736k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
736k
    return Status::OK();
534
736k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
802
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
802
    auto local_state = LocalStateType::create_unique(state, this);
531
802
    RETURN_IF_ERROR(local_state->init(state, info));
532
802
    state->emplace_local_state(operator_id(), std::move(local_state));
533
802
    return Status::OK();
534
802
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
922
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
922
    auto local_state = LocalStateType::create_unique(state, this);
531
922
    RETURN_IF_ERROR(local_state->init(state, info));
532
922
    state->emplace_local_state(operator_id(), std::move(local_state));
533
922
    return Status::OK();
534
922
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.61k
    return Status::OK();
534
7.61k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
420k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
420k
    auto local_state = LocalStateType::create_unique(state, this);
531
420k
    RETURN_IF_ERROR(local_state->init(state, info));
532
420k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
420k
    return Status::OK();
534
420k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.85M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.29M
        : _num_rows_returned(0),
542
2.29M
          _rows_returned_counter(nullptr),
543
2.29M
          _parent(parent),
544
2.29M
          _state(state),
545
2.29M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.30M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.30M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.30M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.30M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.30M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.30M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.30M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.30M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.30M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.30M
    if constexpr (!is_fake_shared) {
560
1.24M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
797k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
797k
                                    .first.get()
563
797k
                                    ->template cast<SharedStateArg>();
564
565
797k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
797k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
797k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
797k
        } else if (info.shared_state) {
569
398k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
398k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
398k
            _dependency = _shared_state->create_source_dependency(
576
398k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
398k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
398k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
398k
        } else {
580
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
18.4E
                DCHECK(false);
582
18.4E
            }
583
52.5k
        }
584
1.24M
    }
585
586
2.30M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.30M
    _rows_returned_counter =
591
2.30M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.30M
    _blocks_returned_counter =
593
2.30M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.30M
    _output_block_bytes_counter =
595
2.30M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.30M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.30M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.30M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.30M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.30M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.30M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.30M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.30M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.30M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.30M
    _memory_used_counter =
606
2.30M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.30M
    _common_profile->add_info_string("IsColocate",
608
2.30M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.30M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.30M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.30M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.30M
    return Status::OK();
613
2.30M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
67.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.1k
    if constexpr (!is_fake_shared) {
560
67.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
10.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
10.8k
                                    .first.get()
563
10.8k
                                    ->template cast<SharedStateArg>();
564
565
10.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
10.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
10.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.3k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
56.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
56.2k
            _dependency = _shared_state->create_source_dependency(
576
56.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
56.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
56.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
56.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
145
        }
584
67.1k
    }
585
586
67.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
67.1k
    _rows_returned_counter =
591
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.1k
    _blocks_returned_counter =
593
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.1k
    _output_block_bytes_counter =
595
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.1k
    _memory_used_counter =
606
67.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.1k
    _common_profile->add_info_string("IsColocate",
608
67.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.1k
    return Status::OK();
613
67.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
215k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
215k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
215k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
215k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
215k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
215k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
215k
    _operator_profile->add_child(_common_profile.get(), true);
557
215k
    _operator_profile->add_child(_custom_profile.get(), true);
558
215k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
215k
    if constexpr (!is_fake_shared) {
560
215k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
215k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
214k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
214k
            _dependency = _shared_state->create_source_dependency(
576
214k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
214k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
214k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
214k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.07k
        }
584
215k
    }
585
586
215k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
215k
    _rows_returned_counter =
591
215k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
215k
    _blocks_returned_counter =
593
215k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
215k
    _output_block_bytes_counter =
595
215k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
215k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
215k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
215k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
215k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
215k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
215k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
215k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
215k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
215k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
215k
    _memory_used_counter =
606
215k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
215k
    _common_profile->add_info_string("IsColocate",
608
215k
                                     std::to_string(_parent->is_colocated_operator()));
609
215k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
215k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
215k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
215k
    return Status::OK();
613
215k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
24
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
24
    _operator_profile->add_child(_common_profile.get(), true);
557
24
    _operator_profile->add_child(_custom_profile.get(), true);
558
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
24
    if constexpr (!is_fake_shared) {
560
24
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
24
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
24
            _dependency = _shared_state->create_source_dependency(
576
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
24
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
24
    }
585
586
24
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
24
    _rows_returned_counter =
591
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
24
    _blocks_returned_counter =
593
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
24
    _output_block_bytes_counter =
595
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
24
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
24
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
24
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
24
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
24
    _memory_used_counter =
606
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
24
    _common_profile->add_info_string("IsColocate",
608
24
                                     std::to_string(_parent->is_colocated_operator()));
609
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
24
    return Status::OK();
613
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.76k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.76k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.76k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.76k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.76k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.76k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.76k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.76k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.76k
    if constexpr (!is_fake_shared) {
560
5.76k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.76k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.75k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.75k
            _dependency = _shared_state->create_source_dependency(
576
5.75k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.75k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.75k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.75k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
15
        }
584
5.76k
    }
585
586
5.76k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.76k
    _rows_returned_counter =
591
5.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.76k
    _blocks_returned_counter =
593
5.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.76k
    _output_block_bytes_counter =
595
5.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.76k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.76k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.76k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.76k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.76k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.76k
    _memory_used_counter =
606
5.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.76k
    _common_profile->add_info_string("IsColocate",
608
5.76k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.76k
    return Status::OK();
613
5.76k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.21k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.21k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.21k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.21k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.21k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.21k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.21k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.21k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.21k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.21k
    if constexpr (!is_fake_shared) {
560
9.21k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.21k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.19k
            _dependency = _shared_state->create_source_dependency(
576
9.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18
        }
584
9.21k
    }
585
586
9.21k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.21k
    _rows_returned_counter =
591
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.21k
    _blocks_returned_counter =
593
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.21k
    _output_block_bytes_counter =
595
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.21k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.21k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.21k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.21k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.21k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.21k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.21k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.21k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.21k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.21k
    _memory_used_counter =
606
9.21k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.21k
    _common_profile->add_info_string("IsColocate",
608
9.21k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.21k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.21k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.21k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.21k
    return Status::OK();
613
9.21k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
99.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
99.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
99.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
99.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
99.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
99.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
99.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
99.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
99.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
99.1k
    if constexpr (!is_fake_shared) {
560
99.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
99.1k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
98.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
98.7k
            _dependency = _shared_state->create_source_dependency(
576
98.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
98.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
98.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
98.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
374
        }
584
99.1k
    }
585
586
99.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
99.1k
    _rows_returned_counter =
591
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
99.1k
    _blocks_returned_counter =
593
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
99.1k
    _output_block_bytes_counter =
595
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
99.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
99.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
99.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
99.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
99.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
99.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
99.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
99.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
99.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
99.1k
    _memory_used_counter =
606
99.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
99.1k
    _common_profile->add_info_string("IsColocate",
608
99.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
99.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
99.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
99.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
99.1k
    return Status::OK();
613
99.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
48.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
48.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
48.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
48.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
48.4k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
48.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
48.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
48.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
48.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
48.4k
    if constexpr (!is_fake_shared) {
560
48.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
48.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
48.4k
                                    .first.get()
563
48.4k
                                    ->template cast<SharedStateArg>();
564
565
48.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
48.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
48.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
48.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5
        }
584
48.4k
    }
585
586
48.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
48.4k
    _rows_returned_counter =
591
48.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
48.4k
    _blocks_returned_counter =
593
48.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
48.4k
    _output_block_bytes_counter =
595
48.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
48.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
48.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
48.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
48.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
48.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
48.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
48.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
48.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
48.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
48.4k
    _memory_used_counter =
606
48.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
48.4k
    _common_profile->add_info_string("IsColocate",
608
48.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
48.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
48.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
48.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
48.4k
    return Status::OK();
613
48.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
72
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
72
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
72
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
72
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
72
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
72
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
72
    _operator_profile->add_child(_common_profile.get(), true);
557
72
    _operator_profile->add_child(_custom_profile.get(), true);
558
72
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
72
    if constexpr (!is_fake_shared) {
560
72
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
72
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
72
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
72
            _dependency = _shared_state->create_source_dependency(
576
72
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
72
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
72
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
72
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
72
    }
585
586
72
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
72
    _rows_returned_counter =
591
72
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
72
    _blocks_returned_counter =
593
72
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
72
    _output_block_bytes_counter =
595
72
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
72
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
72
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
72
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
72
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
72
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
72
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
72
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
72
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
72
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
72
    _memory_used_counter =
606
72
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
72
    _common_profile->add_info_string("IsColocate",
608
72
                                     std::to_string(_parent->is_colocated_operator()));
609
72
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
72
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
72
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
72
    return Status::OK();
613
72
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.05M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.05M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.05M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.05M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.05M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1.05M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.05M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.05M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.05M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
1.05M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1.05M
    _rows_returned_counter =
591
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.05M
    _blocks_returned_counter =
593
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.05M
    _output_block_bytes_counter =
595
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.05M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.05M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.05M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.05M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.05M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.05M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.05M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.05M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.05M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.05M
    _memory_used_counter =
606
1.05M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.05M
    _common_profile->add_info_string("IsColocate",
608
1.05M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.05M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.05M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.05M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.05M
    return Status::OK();
613
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
55.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.2k
    if constexpr (!is_fake_shared) {
560
55.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
55.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
3.85k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.85k
            _dependency = _shared_state->create_source_dependency(
576
3.85k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.4k
        }
584
55.2k
    }
585
586
55.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
55.2k
    _rows_returned_counter =
591
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.2k
    _blocks_returned_counter =
593
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.2k
    _output_block_bytes_counter =
595
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.2k
    _memory_used_counter =
606
55.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.2k
    _common_profile->add_info_string("IsColocate",
608
55.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.2k
    return Status::OK();
613
55.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.45k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.45k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.45k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.45k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.45k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.45k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.45k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.45k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.45k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.45k
    if constexpr (!is_fake_shared) {
560
4.45k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.45k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.45k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.45k
            _dependency = _shared_state->create_source_dependency(
576
4.45k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.45k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.45k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.45k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6
        }
584
4.45k
    }
585
586
4.45k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.45k
    _rows_returned_counter =
591
4.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.45k
    _blocks_returned_counter =
593
4.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.45k
    _output_block_bytes_counter =
595
4.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.45k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.45k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.45k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.45k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.45k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.45k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.45k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.45k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.45k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.45k
    _memory_used_counter =
606
4.45k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.45k
    _common_profile->add_info_string("IsColocate",
608
4.45k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.45k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.45k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.45k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.45k
    return Status::OK();
613
4.45k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
465
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
465
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
465
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
465
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
465
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
465
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
465
    _operator_profile->add_child(_common_profile.get(), true);
557
465
    _operator_profile->add_child(_custom_profile.get(), true);
558
465
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
465
    if constexpr (!is_fake_shared) {
560
465
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
465
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
462
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
462
            _dependency = _shared_state->create_source_dependency(
576
462
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
462
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
462
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
462
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
3
        }
584
465
    }
585
586
465
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
465
    _rows_returned_counter =
591
465
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
465
    _blocks_returned_counter =
593
465
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
465
    _output_block_bytes_counter =
595
465
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
465
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
465
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
465
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
465
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
465
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
465
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
465
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
465
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
465
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
465
    _memory_used_counter =
606
465
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
465
    _common_profile->add_info_string("IsColocate",
608
465
                                     std::to_string(_parent->is_colocated_operator()));
609
465
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
465
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
465
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
465
    return Status::OK();
613
465
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.31k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.31k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.31k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.31k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.31k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.31k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.31k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.31k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.31k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.31k
    if constexpr (!is_fake_shared) {
560
5.31k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.31k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.22k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.22k
            _dependency = _shared_state->create_source_dependency(
576
5.22k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.22k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.22k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.22k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
86
        }
584
5.31k
    }
585
586
5.31k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.31k
    _rows_returned_counter =
591
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.31k
    _blocks_returned_counter =
593
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.31k
    _output_block_bytes_counter =
595
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.31k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.31k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.31k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.31k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.31k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.31k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.31k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.31k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.31k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.31k
    _memory_used_counter =
606
5.31k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.31k
    _common_profile->add_info_string("IsColocate",
608
5.31k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.31k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.31k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.31k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.31k
    return Status::OK();
613
5.31k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
737k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
737k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
737k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
737k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
737k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
737k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
737k
    _operator_profile->add_child(_common_profile.get(), true);
557
737k
    _operator_profile->add_child(_custom_profile.get(), true);
558
737k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
737k
    if constexpr (!is_fake_shared) {
560
737k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
737k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
737k
                                    .first.get()
563
737k
                                    ->template cast<SharedStateArg>();
564
565
737k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
737k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
737k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
18.4E
                DCHECK(false);
582
18.4E
            }
583
18.4E
        }
584
737k
    }
585
586
737k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
737k
    _rows_returned_counter =
591
737k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
737k
    _blocks_returned_counter =
593
737k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
737k
    _output_block_bytes_counter =
595
737k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
737k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
737k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
737k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
737k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
737k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
737k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
737k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
737k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
737k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
737k
    _memory_used_counter =
606
737k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
737k
    _common_profile->add_info_string("IsColocate",
608
737k
                                     std::to_string(_parent->is_colocated_operator()));
609
737k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
737k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
737k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
737k
    return Status::OK();
613
737k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.31M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.31M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.62M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
308k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
308k
    }
621
2.31M
    if (_parent->has_projection()) {
622
395k
        const auto& projection = *_parent->_projection;
623
395k
        _projections.resize(projection.projections.size());
624
2.43M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.03M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.03M
        }
627
395k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
420k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
24.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
301k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
276k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
276k
                        state, _intermediate_projections[i][j]));
633
276k
            }
634
24.7k
        }
635
395k
    }
636
2.31M
    return Status::OK();
637
2.31M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
67.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
67.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
68.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.54k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.54k
    }
621
67.2k
    if (_parent->has_projection()) {
622
67.2k
        const auto& projection = *_parent->_projection;
623
67.2k
        _projections.resize(projection.projections.size());
624
361k
        for (size_t i = 0; i < _projections.size(); i++) {
625
294k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
294k
        }
627
67.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
76.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
8.92k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
207k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
198k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
198k
                        state, _intermediate_projections[i][j]));
633
198k
            }
634
8.92k
        }
635
67.2k
    }
636
67.2k
    return Status::OK();
637
67.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.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
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
216k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
216k
    _conjuncts.resize(_parent->_conjuncts.size());
618
216k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
216k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
402
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
80
    }
636
216k
    return Status::OK();
637
216k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
24
    _conjuncts.resize(_parent->_conjuncts.size());
618
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
24
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
24
    return Status::OK();
637
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.76k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.76k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.83k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
68
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
68
    }
621
5.77k
    if (_parent->has_projection()) {
622
5.77k
        const auto& projection = *_parent->_projection;
623
5.77k
        _projections.resize(projection.projections.size());
624
24.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
18.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
18.7k
        }
627
5.77k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.81k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
45
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
318
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
273
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
273
                        state, _intermediate_projections[i][j]));
633
273
            }
634
45
        }
635
5.77k
    }
636
5.76k
    return Status::OK();
637
5.76k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.22k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.22k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
713
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
713
    }
621
9.22k
    if (_parent->has_projection()) {
622
4.92k
        const auto& projection = *_parent->_projection;
623
4.92k
        _projections.resize(projection.projections.size());
624
20.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.6k
        }
627
4.92k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.01k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
85
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
638
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
553
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
553
                        state, _intermediate_projections[i][j]));
633
553
            }
634
85
        }
635
4.92k
    }
636
9.22k
    return Status::OK();
637
9.22k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
99.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
99.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
100k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.26k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.26k
    }
621
99.3k
    if (_parent->has_projection()) {
622
32.4k
        const auto& projection = *_parent->_projection;
623
32.4k
        _projections.resize(projection.projections.size());
624
292k
        for (size_t i = 0; i < _projections.size(); i++) {
625
260k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
260k
        }
627
32.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
732
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.83k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.10k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.10k
                        state, _intermediate_projections[i][j]));
633
4.10k
            }
634
732
        }
635
32.4k
    }
636
99.3k
    return Status::OK();
637
99.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
48.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
48.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
48.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
31
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
31
    }
621
48.4k
    if (_parent->has_projection()) {
622
127
        const auto& projection = *_parent->_projection;
623
127
        _projections.resize(projection.projections.size());
624
534
        for (size_t i = 0; i < _projections.size(); i++) {
625
407
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
407
        }
627
127
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
127
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
127
    }
636
48.4k
    return Status::OK();
637
48.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
76
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
76
    _conjuncts.resize(_parent->_conjuncts.size());
618
76
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
76
    if (_parent->has_projection()) {
622
47
        const auto& projection = *_parent->_projection;
623
47
        _projections.resize(projection.projections.size());
624
141
        for (size_t i = 0; i < _projections.size(); i++) {
625
94
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
94
        }
627
47
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
47
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
47
    }
636
76
    return Status::OK();
637
76
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.05M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.05M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.36M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
304k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
304k
    }
621
1.05M
    if (_parent->has_projection()) {
622
273k
        const auto& projection = *_parent->_projection;
623
273k
        _projections.resize(projection.projections.size());
624
1.62M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.34M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.34M
        }
627
273k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
287k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
86.6k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
71.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
71.7k
                        state, _intermediate_projections[i][j]));
633
71.7k
            }
634
14.9k
        }
635
273k
    }
636
1.05M
    return Status::OK();
637
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
55.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
55.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
55.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
55.4k
    if (_parent->has_projection()) {
622
11.7k
        const auto& projection = *_parent->_projection;
623
11.7k
        _projections.resize(projection.projections.size());
624
113k
        for (size_t i = 0; i < _projections.size(); i++) {
625
101k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
101k
        }
627
11.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
97
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.70k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.60k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.60k
                        state, _intermediate_projections[i][j]));
633
1.60k
            }
634
97
        }
635
11.7k
    }
636
55.4k
    return Status::OK();
637
55.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.45k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.45k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.90k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
449
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
449
    }
621
4.45k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.45k
    return Status::OK();
637
4.45k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
465
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
465
    _conjuncts.resize(_parent->_conjuncts.size());
618
465
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
465
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
465
    return Status::OK();
637
465
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.31k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.31k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.31k
    if (_parent->has_projection()) {
622
63
        const auto& projection = *_parent->_projection;
623
63
        _projections.resize(projection.projections.size());
624
236
        for (size_t i = 0; i < _projections.size(); i++) {
625
173
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
173
        }
627
63
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
63
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
63
    }
636
5.31k
    return Status::OK();
637
5.31k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
740k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
740k
    _conjuncts.resize(_parent->_conjuncts.size());
618
740k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
740k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
740k
    return Status::OK();
637
740k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
9.23k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.23k
    if (_terminated) {
642
2
        return Status::OK();
643
2
    }
644
9.23k
    _terminated = true;
645
9.23k
    return Status::OK();
646
9.23k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
473
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
473
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
473
    _terminated = true;
645
473
    return Status::OK();
646
473
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
42
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
42
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
42
    _terminated = true;
645
42
    return Status::OK();
646
42
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
41
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
41
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
41
    _terminated = true;
645
41
    return Status::OK();
646
41
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
19
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
19
    _terminated = true;
645
19
    return Status::OK();
646
19
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.23k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.23k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
7.23k
    _terminated = true;
645
7.23k
    return Status::OK();
646
7.23k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
49
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
49
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
49
    _terminated = true;
645
49
    return Status::OK();
646
49
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
294
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
294
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
294
    _terminated = true;
645
294
    return Status::OK();
646
294
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.03k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.03k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
1.03k
    _terminated = true;
645
1.03k
    return Status::OK();
646
1.03k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.56M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.56M
    if (_closed) {
651
247k
        return Status::OK();
652
247k
    }
653
2.31M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.25M
    }
656
2.31M
    _closed = true;
657
2.31M
    return Status::OK();
658
2.56M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
67.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
67.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
67.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
67.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
67.2k
    }
656
67.2k
    _closed = true;
657
67.2k
    return Status::OK();
658
67.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
431k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
431k
    if (_closed) {
651
215k
        return Status::OK();
652
215k
    }
653
216k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
216k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
216k
    }
656
216k
    _closed = true;
657
216k
    return Status::OK();
658
431k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
24
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
24
    }
656
24
    _closed = true;
657
24
    return Status::OK();
658
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.76k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.76k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.76k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.76k
    }
656
5.76k
    _closed = true;
657
5.76k
    return Status::OK();
658
5.76k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
18.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
18.5k
    if (_closed) {
651
9.36k
        return Status::OK();
652
9.36k
    }
653
9.20k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.20k
    }
656
9.20k
    _closed = true;
657
9.20k
    return Status::OK();
658
18.5k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
99.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
99.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
99.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
99.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
99.1k
    }
656
99.1k
    _closed = true;
657
99.1k
    return Status::OK();
658
99.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
48.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
48.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
48.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
48.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
48.2k
    }
656
48.2k
    _closed = true;
657
48.2k
    return Status::OK();
658
48.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71
    }
656
71
    _closed = true;
657
71
    return Status::OK();
658
71
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.07M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.07M
    if (_closed) {
651
16.2k
        return Status::OK();
652
16.2k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.06M
    _closed = true;
657
1.06M
    return Status::OK();
658
1.07M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.5k
    }
656
55.5k
    _closed = true;
657
55.5k
    return Status::OK();
658
55.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.44k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.44k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.44k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.44k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.44k
    }
656
4.44k
    _closed = true;
657
4.44k
    return Status::OK();
658
4.44k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
724
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
724
    if (_closed) {
651
362
        return Status::OK();
652
362
    }
653
362
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
362
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
362
    }
656
362
    _closed = true;
657
362
    return Status::OK();
658
724
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.9k
    if (_closed) {
651
5.60k
        return Status::OK();
652
5.60k
    }
653
5.30k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.30k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.30k
    }
656
5.30k
    _closed = true;
657
5.30k
    return Status::OK();
658
10.9k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
741k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
741k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
741k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
741k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
741k
    }
656
741k
    _closed = true;
657
741k
    return Status::OK();
658
741k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
338
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
338
    if (_closed) {
651
178
        return Status::OK();
652
178
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
338
}
659
660
template <typename SharedState>
661
1.85M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.85M
    _operator_profile =
664
1.85M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.85M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.85M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.85M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.85M
    _operator_profile->add_child(_common_profile, true);
673
1.85M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.85M
    _operator_profile->set_metadata(_parent->node_id());
676
1.85M
    _wait_for_finish_dependency_timer =
677
1.85M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.85M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.85M
    if constexpr (!is_fake_shared) {
680
1.29M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.29M
            info.shared_state_map.end()) {
682
370k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
311k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
311k
            }
685
370k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
370k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
370k
                                                  ? 0
688
370k
                                                  : info.task_idx]
689
370k
                                  .get();
690
370k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
924k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
924k
            _shared_state = info.shared_state->template cast<SharedState>();
696
924k
            _dependency = _shared_state->create_sink_dependency(
697
924k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
924k
        }
699
1.29M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.29M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.29M
    }
702
703
1.85M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.85M
    _rows_input_counter =
708
1.85M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.85M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.85M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.85M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.85M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.85M
    _memory_used_counter =
714
1.85M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.85M
    _common_profile->add_info_string("IsColocate",
716
1.85M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.85M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.85M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.85M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.85M
    return Status::OK();
721
1.85M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
115k
    _operator_profile =
664
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
115k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
115k
    _operator_profile->add_child(_common_profile, true);
673
115k
    _operator_profile->add_child(_custom_profile, true);
674
675
115k
    _operator_profile->set_metadata(_parent->node_id());
676
115k
    _wait_for_finish_dependency_timer =
677
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
115k
    if constexpr (!is_fake_shared) {
680
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
115k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
10.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
10.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
10.8k
                                                  ? 0
688
10.8k
                                                  : info.task_idx]
689
10.8k
                                  .get();
690
10.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
115k
    }
702
703
115k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
115k
    _rows_input_counter =
708
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
115k
    _memory_used_counter =
714
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
115k
    _common_profile->add_info_string("IsColocate",
716
115k
                                     std::to_string(_parent->is_colocated_operator()));
717
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
115k
    return Status::OK();
721
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
215k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
215k
    _operator_profile =
664
215k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
215k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
215k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
215k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
215k
    _operator_profile->add_child(_common_profile, true);
673
215k
    _operator_profile->add_child(_custom_profile, true);
674
675
215k
    _operator_profile->set_metadata(_parent->node_id());
676
215k
    _wait_for_finish_dependency_timer =
677
215k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
215k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
215k
    if constexpr (!is_fake_shared) {
680
215k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
215k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
215k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
215k
            _shared_state = info.shared_state->template cast<SharedState>();
696
215k
            _dependency = _shared_state->create_sink_dependency(
697
215k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
215k
        }
699
215k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
215k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
215k
    }
702
703
215k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
215k
    _rows_input_counter =
708
215k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
215k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
215k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
215k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
215k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
215k
    _memory_used_counter =
714
215k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
215k
    _common_profile->add_info_string("IsColocate",
716
215k
                                     std::to_string(_parent->is_colocated_operator()));
717
215k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
215k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
215k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
215k
    return Status::OK();
721
215k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
31
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
31
    _operator_profile =
664
31
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
31
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
31
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
31
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
31
    _operator_profile->add_child(_common_profile, true);
673
31
    _operator_profile->add_child(_custom_profile, true);
674
675
31
    _operator_profile->set_metadata(_parent->node_id());
676
31
    _wait_for_finish_dependency_timer =
677
31
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
31
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
31
    if constexpr (!is_fake_shared) {
680
31
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
31
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
31
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
31
            _shared_state = info.shared_state->template cast<SharedState>();
696
31
            _dependency = _shared_state->create_sink_dependency(
697
31
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
31
        }
699
31
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
31
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
31
    }
702
703
31
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
31
    _rows_input_counter =
708
31
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
31
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
31
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
31
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
31
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
31
    _memory_used_counter =
714
31
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
31
    _common_profile->add_info_string("IsColocate",
716
31
                                     std::to_string(_parent->is_colocated_operator()));
717
31
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
31
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
31
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
31
    return Status::OK();
721
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.76k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.76k
    _operator_profile =
664
5.76k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.76k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.76k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.76k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.76k
    _operator_profile->add_child(_common_profile, true);
673
5.76k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.76k
    _operator_profile->set_metadata(_parent->node_id());
676
5.76k
    _wait_for_finish_dependency_timer =
677
5.76k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.76k
    if constexpr (!is_fake_shared) {
680
5.76k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.76k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.76k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.76k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.76k
            _dependency = _shared_state->create_sink_dependency(
697
5.76k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.76k
        }
699
5.76k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.76k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.76k
    }
702
703
5.76k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.76k
    _rows_input_counter =
708
5.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.76k
    _memory_used_counter =
714
5.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.76k
    _common_profile->add_info_string("IsColocate",
716
5.76k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.76k
    return Status::OK();
721
5.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.20k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.20k
    _operator_profile =
664
9.20k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.20k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.20k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.20k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.20k
    _operator_profile->add_child(_common_profile, true);
673
9.20k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.20k
    _operator_profile->set_metadata(_parent->node_id());
676
9.20k
    _wait_for_finish_dependency_timer =
677
9.20k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.20k
    if constexpr (!is_fake_shared) {
680
9.20k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.20k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.20k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.20k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.20k
            _dependency = _shared_state->create_sink_dependency(
697
9.20k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.20k
        }
699
9.20k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.20k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.20k
    }
702
703
9.20k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.20k
    _rows_input_counter =
708
9.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.20k
    _memory_used_counter =
714
9.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.20k
    _common_profile->add_info_string("IsColocate",
716
9.20k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.20k
    return Status::OK();
721
9.20k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
99.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
99.1k
    _operator_profile =
664
99.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
99.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
99.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
99.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
99.1k
    _operator_profile->add_child(_common_profile, true);
673
99.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
99.1k
    _operator_profile->set_metadata(_parent->node_id());
676
99.1k
    _wait_for_finish_dependency_timer =
677
99.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
99.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
99.1k
    if constexpr (!is_fake_shared) {
680
99.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
99.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
99.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
99.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
99.1k
            _dependency = _shared_state->create_sink_dependency(
697
99.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
99.1k
        }
699
99.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
99.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
99.1k
    }
702
703
99.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
99.1k
    _rows_input_counter =
708
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
99.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
99.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
99.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
99.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
99.1k
    _memory_used_counter =
714
99.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
99.1k
    _common_profile->add_info_string("IsColocate",
716
99.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
99.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
99.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
99.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
99.1k
    return Status::OK();
721
99.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
48.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
48.4k
    _operator_profile =
664
48.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
48.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
48.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
48.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
48.4k
    _operator_profile->add_child(_common_profile, true);
673
48.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
48.4k
    _operator_profile->set_metadata(_parent->node_id());
676
48.4k
    _wait_for_finish_dependency_timer =
677
48.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
48.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
48.4k
    if constexpr (!is_fake_shared) {
680
48.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
48.4k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
48.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
48.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
48.4k
                                                  ? 0
688
48.4k
                                                  : info.task_idx]
689
48.4k
                                  .get();
690
48.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
48.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
48.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
48.4k
    }
702
703
48.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
48.4k
    _rows_input_counter =
708
48.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
48.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
48.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
48.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
48.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
48.4k
    _memory_used_counter =
714
48.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
48.4k
    _common_profile->add_info_string("IsColocate",
716
48.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
48.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
48.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
48.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
48.4k
    return Status::OK();
721
48.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
82
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
82
    _operator_profile =
664
82
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
82
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
82
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
82
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
82
    _operator_profile->add_child(_common_profile, true);
673
82
    _operator_profile->add_child(_custom_profile, true);
674
675
82
    _operator_profile->set_metadata(_parent->node_id());
676
82
    _wait_for_finish_dependency_timer =
677
82
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
82
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
82
    if constexpr (!is_fake_shared) {
680
82
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
82
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
82
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
82
            _shared_state = info.shared_state->template cast<SharedState>();
696
82
            _dependency = _shared_state->create_sink_dependency(
697
82
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
82
        }
699
82
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
82
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
82
    }
702
703
82
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
82
    _rows_input_counter =
708
82
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
82
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
82
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
82
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
82
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
82
    _memory_used_counter =
714
82
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
82
    _common_profile->add_info_string("IsColocate",
716
82
                                     std::to_string(_parent->is_colocated_operator()));
717
82
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
82
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
82
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
82
    return Status::OK();
721
82
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
563k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
563k
    _operator_profile =
664
563k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
563k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
563k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
563k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
563k
    _operator_profile->add_child(_common_profile, true);
673
563k
    _operator_profile->add_child(_custom_profile, true);
674
675
563k
    _operator_profile->set_metadata(_parent->node_id());
676
563k
    _wait_for_finish_dependency_timer =
677
563k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
563k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
563k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
563k
    _rows_input_counter =
708
563k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
563k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
563k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
563k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
563k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
563k
    _memory_used_counter =
714
563k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
563k
    _common_profile->add_info_string("IsColocate",
716
563k
                                     std::to_string(_parent->is_colocated_operator()));
717
563k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
563k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
563k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
563k
    return Status::OK();
721
563k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.88k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.88k
    _operator_profile =
664
8.88k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.88k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.88k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.88k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.88k
    _operator_profile->add_child(_common_profile, true);
673
8.88k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.88k
    _operator_profile->set_metadata(_parent->node_id());
676
8.88k
    _wait_for_finish_dependency_timer =
677
8.88k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.88k
    if constexpr (!is_fake_shared) {
680
8.88k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.88k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.88k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.88k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.88k
            _dependency = _shared_state->create_sink_dependency(
697
8.88k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.88k
        }
699
8.88k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.88k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.88k
    }
702
703
8.88k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.88k
    _rows_input_counter =
708
8.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.88k
    _memory_used_counter =
714
8.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.88k
    _common_profile->add_info_string("IsColocate",
716
8.88k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.88k
    return Status::OK();
721
8.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
464
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
464
    _operator_profile =
664
464
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
464
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
464
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
464
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
464
    _operator_profile->add_child(_common_profile, true);
673
464
    _operator_profile->add_child(_custom_profile, true);
674
675
464
    _operator_profile->set_metadata(_parent->node_id());
676
464
    _wait_for_finish_dependency_timer =
677
464
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
464
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
464
    if constexpr (!is_fake_shared) {
680
464
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
464
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
464
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
464
            _shared_state = info.shared_state->template cast<SharedState>();
696
464
            _dependency = _shared_state->create_sink_dependency(
697
464
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
464
        }
699
464
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
464
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
464
    }
702
703
464
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
464
    _rows_input_counter =
708
464
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
464
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
464
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
464
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
464
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
464
    _memory_used_counter =
714
464
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
464
    _common_profile->add_info_string("IsColocate",
716
464
                                     std::to_string(_parent->is_colocated_operator()));
717
464
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
464
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
464
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
464
    return Status::OK();
721
464
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.77k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.77k
    _operator_profile =
664
1.77k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.77k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.77k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.77k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.77k
    _operator_profile->add_child(_common_profile, true);
673
1.77k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.77k
    _operator_profile->set_metadata(_parent->node_id());
676
1.77k
    _wait_for_finish_dependency_timer =
677
1.77k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.77k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.77k
    if constexpr (!is_fake_shared) {
680
1.77k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.77k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.77k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.77k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.77k
            _dependency = _shared_state->create_sink_dependency(
697
1.77k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.77k
        }
699
1.77k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.77k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.77k
    }
702
703
1.77k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.77k
    _rows_input_counter =
708
1.77k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.77k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.77k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.77k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.77k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.77k
    _memory_used_counter =
714
1.77k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.77k
    _common_profile->add_info_string("IsColocate",
716
1.77k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.77k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.77k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.77k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.77k
    return Status::OK();
721
1.77k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.1k
    _operator_profile =
664
13.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
13.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.1k
    _operator_profile->add_child(_common_profile, true);
673
13.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.1k
    _operator_profile->set_metadata(_parent->node_id());
676
13.1k
    _wait_for_finish_dependency_timer =
677
13.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.1k
    if constexpr (!is_fake_shared) {
680
13.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
13.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.1k
            _dependency = _shared_state->create_sink_dependency(
697
13.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.1k
        }
699
13.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.1k
    }
702
703
13.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
13.1k
    _rows_input_counter =
708
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.1k
    _memory_used_counter =
714
13.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.1k
    _common_profile->add_info_string("IsColocate",
716
13.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.1k
    return Status::OK();
721
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
308k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
308k
    _operator_profile =
664
308k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
308k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
308k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
308k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
308k
    _operator_profile->add_child(_common_profile, true);
673
308k
    _operator_profile->add_child(_custom_profile, true);
674
675
308k
    _operator_profile->set_metadata(_parent->node_id());
676
308k
    _wait_for_finish_dependency_timer =
677
308k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
308k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
308k
    if constexpr (!is_fake_shared) {
680
308k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
311k
            info.shared_state_map.end()) {
682
311k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
311k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
311k
            }
685
311k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
311k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
311k
                                                  ? 0
688
311k
                                                  : info.task_idx]
689
311k
                                  .get();
690
311k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
308k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
308k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
308k
    }
702
703
309k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
308k
    _rows_input_counter =
708
308k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
308k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
308k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
308k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
308k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
308k
    _memory_used_counter =
714
308k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
308k
    _common_profile->add_info_string("IsColocate",
716
308k
                                     std::to_string(_parent->is_colocated_operator()));
717
308k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
308k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
308k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
308k
    return Status::OK();
721
308k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
469k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
469k
    _operator_profile =
664
469k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
469k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
469k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
469k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
469k
    _operator_profile->add_child(_common_profile, true);
673
469k
    _operator_profile->add_child(_custom_profile, true);
674
675
469k
    _operator_profile->set_metadata(_parent->node_id());
676
469k
    _wait_for_finish_dependency_timer =
677
469k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
469k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
469k
    if constexpr (!is_fake_shared) {
680
469k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
469k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
469k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
469k
            _shared_state = info.shared_state->template cast<SharedState>();
696
469k
            _dependency = _shared_state->create_sink_dependency(
697
469k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
469k
        }
699
469k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
469k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
469k
    }
702
703
469k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
469k
    _rows_input_counter =
708
469k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
469k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
469k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
469k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
469k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
469k
    _memory_used_counter =
714
469k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
469k
    _common_profile->add_info_string("IsColocate",
716
469k
                                     std::to_string(_parent->is_colocated_operator()));
717
469k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
469k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
469k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
469k
    return Status::OK();
721
469k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.87M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.87M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.87M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.30M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.30M
    }
731
1.87M
    _closed = true;
732
1.87M
    return Status::OK();
733
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
115k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
115k
    }
731
115k
    _closed = true;
732
115k
    return Status::OK();
733
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
216k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
216k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
216k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
216k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
216k
    }
731
216k
    _closed = true;
732
216k
    return Status::OK();
733
216k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
22
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
20
    }
731
20
    _closed = true;
732
20
    return Status::OK();
733
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.75k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.75k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.75k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.75k
    }
731
5.75k
    _closed = true;
732
5.75k
    return Status::OK();
733
5.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.18k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.18k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.18k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.18k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.18k
    }
731
9.18k
    _closed = true;
732
9.18k
    return Status::OK();
733
9.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
99.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
99.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
99.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
99.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
99.1k
    }
731
99.1k
    _closed = true;
732
99.1k
    return Status::OK();
733
99.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
48.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
48.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
48.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
48.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
48.3k
    }
731
48.3k
    _closed = true;
732
48.3k
    return Status::OK();
733
48.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
71
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
71
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
71
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
71
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
71
    }
731
71
    _closed = true;
732
71
    return Status::OK();
733
71
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
570k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
570k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
570k
    _closed = true;
732
570k
    return Status::OK();
733
570k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.89k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.89k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.89k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.89k
    }
731
8.89k
    _closed = true;
732
8.89k
    return Status::OK();
733
8.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
363
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
363
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
363
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
363
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
363
    }
731
363
    _closed = true;
732
363
    return Status::OK();
733
363
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.78k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.78k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.78k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.78k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.78k
    }
731
1.78k
    _closed = true;
732
1.78k
    return Status::OK();
733
1.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.0k
    }
731
13.0k
    _closed = true;
732
13.0k
    return Status::OK();
733
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
311k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
311k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
311k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
311k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
311k
    }
731
311k
    _closed = true;
732
311k
    return Status::OK();
733
311k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
471k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
471k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
471k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
471k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
471k
    }
731
471k
    _closed = true;
732
471k
    return Status::OK();
733
471k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
3.01k
                                                          bool* eos) {
738
3.01k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.01k
    return pull(state, block, eos);
740
3.01k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
37
                                                          bool* eos) {
738
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
37
    return pull(state, block, eos);
740
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
2.97k
                                                          bool* eos) {
738
2.97k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
2.97k
    return pull(state, block, eos);
740
2.97k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
646k
                                                         bool* eos) {
745
646k
    auto& local_state = get_local_state(state);
746
646k
    if (need_more_input_data(state)) {
747
615k
        local_state._child_block->clear_column_data(
748
615k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
615k
                        .num_slots());
750
615k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
615k
                state, local_state._child_block.get(), &local_state._child_eos));
752
615k
        *eos = local_state._child_eos;
753
615k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
51.2k
            return Status::OK();
755
51.2k
        }
756
563k
        {
757
563k
            SCOPED_TIMER(local_state.exec_time_counter());
758
563k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
563k
        }
760
563k
    }
761
762
594k
    if (!need_more_input_data(state)) {
763
560k
        SCOPED_TIMER(local_state.exec_time_counter());
764
560k
        bool new_eos = false;
765
560k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
560k
        if (new_eos) {
767
484k
            *eos = true;
768
484k
        } else if (!need_more_input_data(state)) {
769
25.1k
            *eos = false;
770
25.1k
        }
771
560k
    }
772
594k
    return Status::OK();
773
594k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
133k
                                                         bool* eos) {
745
133k
    auto& local_state = get_local_state(state);
746
133k
    if (need_more_input_data(state)) {
747
115k
        local_state._child_block->clear_column_data(
748
115k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
115k
                        .num_slots());
750
115k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
115k
                state, local_state._child_block.get(), &local_state._child_eos));
752
115k
        *eos = local_state._child_eos;
753
115k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.4k
            return Status::OK();
755
35.4k
        }
756
80.0k
        {
757
80.0k
            SCOPED_TIMER(local_state.exec_time_counter());
758
80.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
80.0k
        }
760
80.0k
    }
761
762
98.5k
    if (!need_more_input_data(state)) {
763
98.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
98.5k
        bool new_eos = false;
765
98.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
98.5k
        if (new_eos) {
767
43.0k
            *eos = true;
768
55.4k
        } else if (!need_more_input_data(state)) {
769
11.1k
            *eos = false;
770
11.1k
        }
771
98.5k
    }
772
98.4k
    return Status::OK();
773
98.4k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.35k
                                                         bool* eos) {
745
4.35k
    auto& local_state = get_local_state(state);
746
4.35k
    if (need_more_input_data(state)) {
747
2.37k
        local_state._child_block->clear_column_data(
748
2.37k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.37k
                        .num_slots());
750
2.37k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.37k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.37k
        *eos = local_state._child_eos;
753
2.37k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
507
            return Status::OK();
755
507
        }
756
1.87k
        {
757
1.87k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.87k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.87k
        }
760
1.87k
    }
761
762
3.85k
    if (!need_more_input_data(state)) {
763
3.85k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.85k
        bool new_eos = false;
765
3.85k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.85k
        if (new_eos) {
767
1.31k
            *eos = true;
768
2.53k
        } else if (!need_more_input_data(state)) {
769
1.96k
            *eos = false;
770
1.96k
        }
771
3.85k
    }
772
3.84k
    return Status::OK();
773
3.84k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.90k
                                                         bool* eos) {
745
1.90k
    auto& local_state = get_local_state(state);
746
1.90k
    if (need_more_input_data(state)) {
747
1.90k
        local_state._child_block->clear_column_data(
748
1.90k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.90k
                        .num_slots());
750
1.90k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.90k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.90k
        *eos = local_state._child_eos;
753
1.90k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
783
            return Status::OK();
755
783
        }
756
1.12k
        {
757
1.12k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.12k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.12k
        }
760
1.12k
    }
761
762
1.12k
    if (!need_more_input_data(state)) {
763
1.12k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.12k
        bool new_eos = false;
765
1.12k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.12k
        if (new_eos) {
767
802
            *eos = true;
768
802
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.12k
    }
772
1.12k
    return Status::OK();
773
1.12k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.1k
                                                         bool* eos) {
745
20.1k
    auto& local_state = get_local_state(state);
746
20.1k
    if (need_more_input_data(state)) {
747
20.1k
        local_state._child_block->clear_column_data(
748
20.1k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
20.1k
                        .num_slots());
750
20.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
20.1k
                state, local_state._child_block.get(), &local_state._child_eos));
752
20.1k
        *eos = local_state._child_eos;
753
20.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.94k
            return Status::OK();
755
2.94k
        }
756
17.2k
        {
757
17.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
17.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
17.2k
        }
760
17.2k
    }
761
762
17.1k
    if (!need_more_input_data(state)) {
763
7.68k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.68k
        bool new_eos = false;
765
7.68k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.68k
        if (new_eos) {
767
7.53k
            *eos = true;
768
7.53k
        } else if (!need_more_input_data(state)) {
769
14
            *eos = false;
770
14
        }
771
7.68k
    }
772
17.1k
    return Status::OK();
773
17.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
456k
                                                         bool* eos) {
745
456k
    auto& local_state = get_local_state(state);
746
457k
    if (need_more_input_data(state)) {
747
457k
        local_state._child_block->clear_column_data(
748
457k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
457k
                        .num_slots());
750
457k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
457k
                state, local_state._child_block.get(), &local_state._child_eos));
752
457k
        *eos = local_state._child_eos;
753
457k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
10.5k
            return Status::OK();
755
10.5k
        }
756
446k
        {
757
446k
            SCOPED_TIMER(local_state.exec_time_counter());
758
446k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
446k
        }
760
446k
    }
761
762
445k
    if (!need_more_input_data(state)) {
763
421k
        SCOPED_TIMER(local_state.exec_time_counter());
764
421k
        bool new_eos = false;
765
421k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
421k
        if (new_eos) {
767
420k
            *eos = true;
768
420k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
421k
    }
772
445k
    return Status::OK();
773
445k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.7k
                                                         bool* eos) {
745
21.7k
    auto& local_state = get_local_state(state);
746
21.7k
    if (need_more_input_data(state)) {
747
10.0k
        local_state._child_block->clear_column_data(
748
10.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.0k
                        .num_slots());
750
10.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.0k
        *eos = local_state._child_eos;
753
10.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
511
            return Status::OK();
755
511
        }
756
9.56k
        {
757
9.56k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.56k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.56k
        }
760
9.56k
    }
761
762
21.2k
    if (!need_more_input_data(state)) {
763
20.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.7k
        bool new_eos = false;
765
20.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.7k
        if (new_eos) {
767
5.73k
            *eos = true;
768
15.0k
        } else if (!need_more_input_data(state)) {
769
11.6k
            *eos = false;
770
11.6k
        }
771
20.7k
    }
772
21.2k
    return Status::OK();
773
21.2k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.97k
                                                         bool* eos) {
745
7.97k
    auto& local_state = get_local_state(state);
746
7.97k
    if (need_more_input_data(state)) {
747
7.63k
        local_state._child_block->clear_column_data(
748
7.63k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.63k
                        .num_slots());
750
7.63k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.63k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.63k
        *eos = local_state._child_eos;
753
7.63k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
552
            return Status::OK();
755
552
        }
756
7.08k
        {
757
7.08k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.08k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.08k
        }
760
7.08k
    }
761
762
7.44k
    if (!need_more_input_data(state)) {
763
7.44k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.44k
        bool new_eos = false;
765
7.44k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.44k
        if (new_eos) {
767
5.26k
            *eos = true;
768
5.26k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.44k
    }
772
7.42k
    return Status::OK();
773
7.42k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
48.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
48.3k
    RETURN_IF_ERROR(Base::init(state, info));
779
48.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
48.3k
                                                         "AsyncWriterDependency", true);
781
48.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
48.3k
                             _finish_dependency));
783
784
48.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
48.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
48.3k
    return Status::OK();
787
48.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
355
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
355
    RETURN_IF_ERROR(Base::init(state, info));
779
355
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
355
                                                         "AsyncWriterDependency", true);
781
355
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
355
                             _finish_dependency));
783
784
355
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
355
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
355
    return Status::OK();
787
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
47.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.9k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.9k
                                                         "AsyncWriterDependency", true);
781
47.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.9k
                             _finish_dependency));
783
784
47.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.9k
    return Status::OK();
787
47.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
14
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
14
    RETURN_IF_ERROR(Base::init(state, info));
779
14
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
14
                                                         "AsyncWriterDependency", true);
781
14
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
14
                             _finish_dependency));
783
784
14
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
14
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
14
    return Status::OK();
787
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
48.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.8k
    RETURN_IF_ERROR(Base::open(state));
793
48.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
389k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
341k
        RETURN_IF_ERROR(
796
341k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
341k
    }
798
48.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.8k
    return Status::OK();
800
48.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
355
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
355
    RETURN_IF_ERROR(Base::open(state));
793
355
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.84k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.49k
        RETURN_IF_ERROR(
796
1.49k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.49k
    }
798
355
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
355
    return Status::OK();
800
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
48.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.4k
    RETURN_IF_ERROR(Base::open(state));
793
48.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
339k
        RETURN_IF_ERROR(
796
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
339k
    }
798
48.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.4k
    return Status::OK();
800
48.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
14
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
14
    RETURN_IF_ERROR(Base::open(state));
793
14
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
252
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
238
        RETURN_IF_ERROR(
796
238
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
238
    }
798
14
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
14
    return Status::OK();
800
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
63.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.9k
    return _writer->sink(block, eos);
806
63.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.48k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.48k
    return _writer->sink(block, eos);
806
1.48k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
62.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
62.4k
    return _writer->sink(block, eos);
806
62.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
14
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
14
    return _writer->sink(block, eos);
806
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
48.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.8k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
48.8k
    if (_writer) {
818
48.8k
        Status st = _writer->get_writer_status();
819
48.8k
        if (exec_status.ok()) {
820
48.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.7k
                                                       : Status::Cancelled("force close"));
822
48.7k
        } else {
823
84
            _writer->force_close(exec_status);
824
84
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
48.8k
        RETURN_IF_ERROR(st);
829
48.8k
    }
830
48.7k
    return Base::close(state, exec_status);
831
48.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
345
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
345
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
345
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
345
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
345
    if (_writer) {
818
345
        Status st = _writer->get_writer_status();
819
345
        if (exec_status.ok()) {
820
345
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
345
                                                       : Status::Cancelled("force close"));
822
345
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
345
        RETURN_IF_ERROR(st);
829
345
    }
830
345
    return Base::close(state, exec_status);
831
345
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
48.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
48.5k
    if (_writer) {
818
48.5k
        Status st = _writer->get_writer_status();
819
48.5k
        if (exec_status.ok()) {
820
48.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.4k
                                                       : Status::Cancelled("force close"));
822
48.4k
        } else {
823
84
            _writer->force_close(exec_status);
824
84
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
48.5k
        RETURN_IF_ERROR(st);
829
48.5k
    }
830
48.4k
    return Base::close(state, exec_status);
831
48.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
14
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
14
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
14
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
14
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
14
    if (_writer) {
818
14
        Status st = _writer->get_writer_status();
819
14
        if (exec_status.ok()) {
820
14
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
14
                                                       : Status::Cancelled("force close"));
822
14
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
14
        RETURN_IF_ERROR(st);
829
14
    }
830
14
    return Base::close(state, exec_status);
831
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
977
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
978
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
979
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
980
981
#ifdef BE_TEST
982
template class OperatorX<DummyOperatorLocalState>;
983
template class DataSinkOperatorX<DummySinkLocalState>;
984
#endif
985
986
} // namespace doris