Coverage Report

Created: 2026-09-28 10:29

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/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.84M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.84M
    if (_parent->nereids_id() == -1) {
122
952k
        return fmt::format("(id={})", _parent->node_id());
123
952k
    } else {
124
891k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
891k
    }
126
1.84M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
95.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
95.9k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
95.9k
    } else {
124
95.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
95.9k
    }
126
95.9k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
2
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
2
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
2
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
194k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
194k
    if (_parent->nereids_id() == -1) {
122
24
        return fmt::format("(id={})", _parent->node_id());
123
194k
    } else {
124
194k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
194k
    }
126
194k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
36
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
36
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
36
    } else {
124
36
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
36
    }
126
36
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
7.34k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
7.34k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
7.34k
    } else {
124
7.34k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
7.34k
    }
126
7.34k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
11.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
11.1k
    if (_parent->nereids_id() == -1) {
122
28
        return fmt::format("(id={})", _parent->node_id());
123
11.1k
    } else {
124
11.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
11.1k
    }
126
11.1k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
92.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
92.2k
    if (_parent->nereids_id() == -1) {
122
58
        return fmt::format("(id={})", _parent->node_id());
123
92.1k
    } else {
124
92.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
92.1k
    }
126
92.2k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
78.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
78.1k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
78.1k
    } else {
124
78.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
78.1k
    }
126
78.1k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
154
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
154
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
154
    } else {
124
154
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
154
    }
126
154
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
651k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
651k
    if (_parent->nereids_id() == -1) {
122
299k
        return fmt::format("(id={})", _parent->node_id());
123
352k
    } else {
124
352k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
352k
    }
126
651k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
55.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
55.0k
    if (_parent->nereids_id() == -1) {
122
4
        return fmt::format("(id={})", _parent->node_id());
123
55.0k
    } else {
124
55.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
55.0k
    }
126
55.0k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
38
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
38
    if (_parent->nereids_id() == -1) {
122
38
        return fmt::format("(id={})", _parent->node_id());
123
38
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
38
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.41k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.42k
    if (_parent->nereids_id() == -1) {
122
5.42k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
5.41k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
611
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
611
    if (_parent->nereids_id() == -1) {
122
204
        return fmt::format("(id={})", _parent->node_id());
123
407
    } else {
124
407
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
407
    }
126
611
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.00k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.00k
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
4.97k
    } else {
124
4.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.97k
    }
126
5.00k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
646k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
647k
    if (_parent->nereids_id() == -1) {
122
647k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
646k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
169
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
169
    } else {
124
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
169
    }
126
169
}
127
128
template <typename SharedStateArg>
129
1.30M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.30M
    if (_parent->nereids_id() == -1) {
131
711k
        return fmt::format("(id={})", _parent->node_id());
132
711k
    } else {
133
589k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
589k
    }
135
1.30M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
192k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
192k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
192k
    } else {
133
192k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
192k
    }
135
192k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
4
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4
    if (_parent->nereids_id() == -1) {
131
2
        return fmt::format("(id={})", _parent->node_id());
132
2
    } else {
133
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
2
    }
135
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
197k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
197k
    if (_parent->nereids_id() == -1) {
131
18
        return fmt::format("(id={})", _parent->node_id());
132
197k
    } else {
133
197k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
197k
    }
135
197k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
50
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
50
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
50
    } else {
133
50
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
50
    }
135
50
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.34k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.34k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
7.34k
    } else {
133
7.34k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.34k
    }
135
7.34k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
11.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
11.4k
    if (_parent->nereids_id() == -1) {
131
28
        return fmt::format("(id={})", _parent->node_id());
132
11.3k
    } else {
133
11.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
11.3k
    }
135
11.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
92.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
92.8k
    if (_parent->nereids_id() == -1) {
131
58
        return fmt::format("(id={})", _parent->node_id());
132
92.7k
    } else {
133
92.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
92.7k
    }
135
92.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
77.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
77.7k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
77.7k
    } else {
133
77.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
77.7k
    }
135
77.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
174
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
174
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
174
    } else {
133
174
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
174
    }
135
174
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
18
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
18
    if (_parent->nereids_id() == -1) {
131
18
        return fmt::format("(id={})", _parent->node_id());
132
18
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
18
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
10.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
10.2k
    if (_parent->nereids_id() == -1) {
131
6
        return fmt::format("(id={})", _parent->node_id());
132
10.2k
    } else {
133
10.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
10.2k
    }
135
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
613
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
613
    if (_parent->nereids_id() == -1) {
131
204
        return fmt::format("(id={})", _parent->node_id());
132
409
    } else {
133
409
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
409
    }
135
613
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.5k
    if (_parent->nereids_id() == -1) {
131
12.5k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
258k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
258k
    if (_parent->nereids_id() == -1) {
131
258k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
258k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
439k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
439k
    if (_parent->nereids_id() == -1) {
131
439k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
439k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
36
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
36
    if (_parent->nereids_id() == -1) {
131
36
        return fmt::format("(id={})", _parent->node_id());
132
36
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
36
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
338
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
338
    } else {
133
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
338
    }
135
338
}
136
137
template <typename SharedStateArg>
138
54.3k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
54.3k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
54.3k
    _terminated = true;
143
54.3k
    return Status::OK();
144
54.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
48.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
48.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
48.0k
    _terminated = true;
143
48.0k
    return Status::OK();
144
48.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.46k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.46k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.46k
    _terminated = true;
143
2.46k
    return Status::OK();
144
2.46k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.50k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.50k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.50k
    _terminated = true;
143
1.50k
    return Status::OK();
144
1.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
481
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
481
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
481
    _terminated = true;
143
481
    return Status::OK();
144
481
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
761
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
761
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
761
    _terminated = true;
143
761
    return Status::OK();
144
761
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
381
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
381
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
381
    _terminated = true;
143
381
    return Status::OK();
144
381
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
7
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
7
    _terminated = true;
143
7
    return Status::OK();
144
7
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
224
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
224
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
224
    _terminated = true;
143
224
    return Status::OK();
144
224
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
14
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
14
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
14
    _terminated = true;
143
14
    return Status::OK();
144
14
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
363
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
363
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
363
    _terminated = true;
143
363
    return Status::OK();
144
363
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
130
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
130
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
130
    _terminated = true;
143
130
    return Status::OK();
144
130
}
145
146
312k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
312k
    return _child && _child->is_serial_operator() && !is_source()
148
312k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
312k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
312k
}
151
152
23.2k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
23.2k
    if (!_child) {
154
21.9k
        return false;
155
21.9k
    }
156
1.26k
    if (_child->is_serial_operator()) {
157
223
        return true;
158
223
    }
159
1.04k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.04k
    return child_distribution.need_local_exchange() &&
161
1.04k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.26k
}
163
164
template <typename SharedStateArg>
165
24.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
24.0k
    fmt::memory_buffer debug_string_buffer;
167
24.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
24.0k
    return fmt::to_string(debug_string_buffer);
169
24.0k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
6
    fmt::memory_buffer debug_string_buffer;
167
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
6
    return fmt::to_string(debug_string_buffer);
169
6
}
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
165
24.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
24.0k
    fmt::memory_buffer debug_string_buffer;
167
24.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
24.0k
    return fmt::to_string(debug_string_buffer);
169
24.0k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
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
170
171
template <typename SharedStateArg>
172
24.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
24.0k
    fmt::memory_buffer debug_string_buffer;
174
24.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
24.0k
    return fmt::to_string(debug_string_buffer);
176
24.0k
}
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
172
24.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
24.0k
    fmt::memory_buffer debug_string_buffer;
174
24.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
24.0k
    return fmt::to_string(debug_string_buffer);
176
24.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
24.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
24.0k
    fmt::memory_buffer debug_string_buffer;
180
24.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
24.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
24.0k
                   _is_serial_operator);
183
24.0k
    return fmt::to_string(debug_string_buffer);
184
24.0k
}
185
186
24.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
24.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
24.0k
}
189
190
691k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
691k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
691k
    _nereids_id = tnode.nereids_id;
193
691k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.90k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.90k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.90k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.90k
    }
206
691k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
691k
    _op_name = substr + "_OPERATOR";
208
209
691k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
691k
    } else if (tnode.__isset.conjuncts) {
212
275k
        for (const auto& conjunct : tnode.conjuncts) {
213
275k
            VExprContextSPtr context;
214
275k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
275k
            _conjuncts.emplace_back(context);
216
275k
        }
217
101k
    }
218
219
    // create the projections expr
220
691k
    if (tnode.__isset.projections) {
221
287k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
287k
    }
223
691k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.90k
        DCHECK(has_projection()) << "no final projections";
225
3.90k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.62k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.62k
            VExprContextSPtrs projections;
228
6.62k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.62k
            _projection->intermediate_projections.push_back(projections);
230
6.62k
        }
231
3.90k
    }
232
691k
    return Status::OK();
233
691k
}
234
235
742k
Status OperatorXBase::prepare(RuntimeState* state) {
236
742k
    for (auto& conjunct : _conjuncts) {
237
274k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
274k
    }
239
742k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
644k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
339k
            return a->execute_cost() < b->execute_cost();
242
339k
        });
243
644k
    };
244
245
742k
    if (has_projection()) {
246
286k
        auto& projection = *_projection;
247
293k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
6.62k
            const auto& input_row_desc =
249
6.62k
                    i == 0 ? operator_row_desc_before_projection()
250
6.62k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
6.62k
            RETURN_IF_ERROR(
252
6.62k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
6.62k
        }
254
286k
        const auto& final_projection_input_row_desc =
255
286k
                projection.intermediate_output_row_descriptors.empty()
256
286k
                        ? operator_row_desc_before_projection()
257
286k
                        : projection.intermediate_output_row_descriptors.back();
258
286k
        RETURN_IF_ERROR(
259
286k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
286k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
286k
                                                      projection.output_row_descriptor));
262
286k
    }
263
264
742k
    for (auto& conjunct : _conjuncts) {
265
275k
        RETURN_IF_ERROR(conjunct->open(state));
266
275k
    }
267
742k
    if (has_projection()) {
268
286k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
286k
        for (auto& projections : _projection->intermediate_projections) {
270
6.62k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.62k
        }
272
286k
    }
273
742k
    if (_child && !is_source()) {
274
125k
        RETURN_IF_ERROR(_child->prepare(state));
275
125k
    }
276
277
742k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
742k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
742k
    return Status::OK();
283
742k
}
284
285
7.05k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.05k
    if (_child && !is_source()) {
287
691
        RETURN_IF_ERROR(_child->terminate(state));
288
691
    }
289
7.05k
    auto result = state->get_local_state_result(operator_id());
290
7.05k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.05k
    return result.value()->terminate(state);
294
7.05k
}
295
296
4.99M
Status OperatorXBase::close(RuntimeState* state) {
297
4.99M
    if (_child && !is_source()) {
298
870k
        RETURN_IF_ERROR(_child->close(state));
299
870k
    }
300
4.99M
    auto result = state->get_local_state_result(operator_id());
301
4.99M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.99M
    return result.value()->close(state);
305
4.99M
}
306
307
290k
void PipelineXLocalStateBase::clear_origin_block() {
308
290k
    _origin_block.clear_column_data(
309
290k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
290k
}
311
312
873k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
873k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
873k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
873k
    return Status::OK();
317
873k
}
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
290k
                                     Block* output_block) const {
326
290k
    auto* local_state = state->get_local_state(operator_id());
327
290k
    SCOPED_TIMER(local_state->exec_time_counter());
328
290k
    SCOPED_TIMER(local_state->_projection_timer);
329
290k
    const size_t rows = origin_block->rows();
330
290k
    if (rows == 0) {
331
155k
        return Status::OK();
332
155k
    }
333
134k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
134k
    {
336
134k
        Block input_block = *origin_block;
337
338
134k
        ColumnsWithTypeAndName new_columns;
339
134k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.63k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.63k
            new_columns.resize(projections.size());
345
69.1k
            for (int i = 0; i < projections.size(); i++) {
346
65.5k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
65.5k
                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
65.5k
            }
355
3.62k
            Block tmp_block {new_columns};
356
3.62k
            input_block.swap(tmp_block);
357
3.62k
        }
358
359
134k
        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
134k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
134k
                output_block, _projection->output_row_descriptor);
368
134k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
134k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
134k
        Columns shared_columns(mutable_columns.size());
371
372
792k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
658k
            ColumnPtr column_ptr;
374
658k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
658k
            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
658k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
658k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
658k
            if (column_ptr->is_exclusive()) {
386
233k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
425k
            } else {
388
425k
                shared_columns[i] = std::move(column_ptr);
389
425k
            }
390
658k
        }
391
392
134k
        scoped_mutable_block.restore();
393
792k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
658k
            if (shared_columns[i]) {
395
425k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
425k
            }
397
658k
        }
398
134k
    }
399
400
0
    origin_block->clear_column_data(
401
134k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
134k
    DCHECK_EQ(output_block->rows(), rows);
403
404
134k
    return Status::OK();
405
134k
}
406
407
5.18M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
5.18M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
5.18M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
5.18M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
5.18M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
5.18M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
5.18M
            if (_debug_point_count++ % 2 == 0) {
414
5.18M
                return Status::OK();
415
5.18M
            }
416
5.18M
        }
417
5.18M
    });
418
419
5.18M
    Status status;
420
5.18M
    auto* local_state = state->get_local_state(operator_id());
421
5.18M
    Defer defer([&]() {
422
5.18M
        if (status.ok()) {
423
5.18M
            local_state->update_output_block_counters(*block);
424
5.18M
        }
425
5.18M
    });
426
5.18M
    if (has_projection()) {
427
289k
        local_state->clear_origin_block();
428
289k
        status = get_block(state, &local_state->_origin_block, eos);
429
289k
        if (UNLIKELY(!status.ok())) {
430
26
            return status;
431
26
        }
432
289k
        status = do_projections(state, &local_state->_origin_block, block);
433
289k
        return status;
434
289k
    }
435
4.89M
    status = get_block(state, block, eos);
436
4.89M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.89M
    return status;
438
4.89M
}
439
440
2.81M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.81M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.57k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.57k
        *eos = true;
444
9.57k
    }
445
446
2.81M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.81M
        auto op_name = to_lower(_parent->_op_name);
448
2.81M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.81M
        arg_op_name = to_lower(arg_op_name);
450
451
2.81M
        if (op_name == arg_op_name) {
452
2.81M
            *eos = true;
453
2.81M
        }
454
2.81M
    });
455
456
2.81M
    if (auto rows = block->rows()) {
457
770k
        _num_rows_returned += rows;
458
770k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
770k
    }
460
2.81M
}
461
462
54.3k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
54.3k
    auto result = state->get_sink_local_state_result();
464
54.3k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
54.3k
    return result.value()->terminate(state);
468
54.3k
}
469
470
24.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
24.0k
    fmt::memory_buffer debug_string_buffer;
472
473
24.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
24.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
24.0k
    return fmt::to_string(debug_string_buffer);
476
24.0k
}
477
478
24.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
24.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
24.0k
}
481
482
346k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
346k
    std::string op_name = "UNKNOWN_SINK";
484
346k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
347k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
347k
        op_name = it->second;
488
347k
    }
489
346k
    _name = op_name + "_OPERATOR";
490
346k
    return Status::OK();
491
346k
}
492
493
364k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
364k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
364k
    _nereids_id = tnode.nereids_id;
496
364k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
364k
    _name = substr + "_SINK_OPERATOR";
498
364k
    return Status::OK();
499
364k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.80M
                                                            LocalSinkStateInfo& info) {
504
1.80M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.80M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.80M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.80M
    return Status::OK();
508
1.80M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
192k
                                                            LocalSinkStateInfo& info) {
504
192k
    auto local_state = LocalStateType::create_unique(this, state);
505
192k
    RETURN_IF_ERROR(local_state->init(state, info));
506
192k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
192k
    return Status::OK();
508
192k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
393k
                                                            LocalSinkStateInfo& info) {
504
393k
    auto local_state = LocalStateType::create_unique(this, state);
505
393k
    RETURN_IF_ERROR(local_state->init(state, info));
506
393k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
393k
    return Status::OK();
508
393k
}
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
353
                                                            LocalSinkStateInfo& info) {
504
353
    auto local_state = LocalStateType::create_unique(this, state);
505
353
    RETURN_IF_ERROR(local_state->init(state, info));
506
353
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
353
    return Status::OK();
508
353
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46.6k
                                                            LocalSinkStateInfo& info) {
504
46.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
46.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
46.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46.6k
    return Status::OK();
508
46.6k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
32
                                                            LocalSinkStateInfo& info) {
504
32
    auto local_state = LocalStateType::create_unique(this, state);
505
32
    RETURN_IF_ERROR(local_state->init(state, info));
506
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
32
    return Status::OK();
508
32
}
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_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
11.4k
                                                            LocalSinkStateInfo& info) {
504
11.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.4k
    return Status::OK();
508
11.4k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
15
                                                            LocalSinkStateInfo& info) {
504
15
    auto local_state = LocalStateType::create_unique(this, state);
505
15
    RETURN_IF_ERROR(local_state->init(state, info));
506
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
15
    return Status::OK();
508
15
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
197k
                                                            LocalSinkStateInfo& info) {
504
197k
    auto local_state = LocalStateType::create_unique(this, state);
505
197k
    RETURN_IF_ERROR(local_state->init(state, info));
506
197k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
197k
    return Status::OK();
508
197k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
50
                                                            LocalSinkStateInfo& info) {
504
50
    auto local_state = LocalStateType::create_unique(this, state);
505
50
    RETURN_IF_ERROR(local_state->init(state, info));
506
50
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
50
    return Status::OK();
508
50
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
258k
                                                            LocalSinkStateInfo& info) {
504
258k
    auto local_state = LocalStateType::create_unique(this, state);
505
258k
    RETURN_IF_ERROR(local_state->init(state, info));
506
258k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
258k
    return Status::OK();
508
258k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
92.7k
                                                            LocalSinkStateInfo& info) {
504
92.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
92.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
92.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
92.7k
    return Status::OK();
508
92.7k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
77.6k
                                                            LocalSinkStateInfo& info) {
504
77.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
77.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
77.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
77.6k
    return Status::OK();
508
77.6k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
174
                                                            LocalSinkStateInfo& info) {
504
174
    auto local_state = LocalStateType::create_unique(this, state);
505
174
    RETURN_IF_ERROR(local_state->init(state, info));
506
174
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
174
    return Status::OK();
508
174
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
500k
                                                            LocalSinkStateInfo& info) {
504
500k
    auto local_state = LocalStateType::create_unique(this, state);
505
500k
    RETURN_IF_ERROR(local_state->init(state, info));
506
500k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
500k
    return Status::OK();
508
500k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.36k
                                                            LocalSinkStateInfo& info) {
504
7.36k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.36k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.36k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.36k
    return Status::OK();
508
7.36k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.2k
                                                            LocalSinkStateInfo& info) {
504
10.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.2k
    return Status::OK();
508
10.2k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.17k
                                                            LocalSinkStateInfo& info) {
504
2.17k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.17k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.17k
    return Status::OK();
508
2.17k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
405
                                                            LocalSinkStateInfo& info) {
504
405
    auto local_state = LocalStateType::create_unique(this, state);
505
405
    RETURN_IF_ERROR(local_state->init(state, info));
506
405
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
405
    return Status::OK();
508
405
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.80k
                                                            LocalSinkStateInfo& info) {
504
4.80k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.80k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.80k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.80k
    return Status::OK();
508
4.80k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.58k
                                                            LocalSinkStateInfo& info) {
504
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.58k
    return Status::OK();
508
2.58k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.47k
                                                            LocalSinkStateInfo& info) {
504
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.47k
    return Status::OK();
508
2.47k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2
                                                            LocalSinkStateInfo& info) {
504
2
    auto local_state = LocalStateType::create_unique(this, state);
505
2
    RETURN_IF_ERROR(local_state->init(state, info));
506
2
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2
    return Status::OK();
508
2
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
564
                                                            LocalSinkStateInfo& info) {
504
564
    auto local_state = LocalStateType::create_unique(this, state);
505
564
    RETURN_IF_ERROR(local_state->init(state, info));
506
564
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
564
    return Status::OK();
508
564
}
_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.43M
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.43M
    } else {
519
1.43M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.43M
        ss->id = operator_id();
521
1.43M
        for (auto& dest : dests_id()) {
522
1.43M
            ss->related_op_ids.insert(dest);
523
1.43M
        }
524
1.43M
        return ss;
525
1.43M
    }
526
1.43M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
176k
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
176k
    } else {
519
176k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
176k
        ss->id = operator_id();
521
176k
        for (auto& dest : dests_id()) {
522
175k
            ss->related_op_ids.insert(dest);
523
175k
        }
524
176k
        return ss;
525
176k
    }
526
176k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
394k
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
394k
    } else {
519
394k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
394k
        ss->id = operator_id();
521
394k
        for (auto& dest : dests_id()) {
522
392k
            ss->related_op_ids.insert(dest);
523
392k
        }
524
394k
        return ss;
525
394k
    }
526
394k
}
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
353
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
353
    } else {
519
353
        auto ss = LocalStateType::SharedStateType::create_shared();
520
353
        ss->id = operator_id();
521
353
        for (auto& dest : dests_id()) {
522
352
            ss->related_op_ids.insert(dest);
523
352
        }
524
353
        return ss;
525
353
    }
526
353
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
46.8k
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
46.8k
    } else {
519
46.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
46.8k
        ss->id = operator_id();
521
46.8k
        for (auto& dest : dests_id()) {
522
46.5k
            ss->related_op_ids.insert(dest);
523
46.5k
        }
524
46.8k
        return ss;
525
46.8k
    }
526
46.8k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
32
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
32
    } else {
519
32
        auto ss = LocalStateType::SharedStateType::create_shared();
520
32
        ss->id = operator_id();
521
32
        for (auto& dest : dests_id()) {
522
32
            ss->related_op_ids.insert(dest);
523
32
        }
524
32
        return ss;
525
32
    }
526
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_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
11.6k
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
11.6k
    } else {
519
11.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
11.6k
        ss->id = operator_id();
521
11.6k
        for (auto& dest : dests_id()) {
522
11.6k
            ss->related_op_ids.insert(dest);
523
11.6k
        }
524
11.6k
        return ss;
525
11.6k
    }
526
11.6k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
15
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
15
    } else {
519
15
        auto ss = LocalStateType::SharedStateType::create_shared();
520
15
        ss->id = operator_id();
521
15
        for (auto& dest : dests_id()) {
522
15
            ss->related_op_ids.insert(dest);
523
15
        }
524
15
        return ss;
525
15
    }
526
15
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
198k
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
198k
    } else {
519
198k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
198k
        ss->id = operator_id();
521
198k
        for (auto& dest : dests_id()) {
522
198k
            ss->related_op_ids.insert(dest);
523
198k
        }
524
198k
        return ss;
525
198k
    }
526
198k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
54
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
54
    } else {
519
54
        auto ss = LocalStateType::SharedStateType::create_shared();
520
54
        ss->id = operator_id();
521
54
        for (auto& dest : dests_id()) {
522
54
            ss->related_op_ids.insert(dest);
523
54
        }
524
54
        return ss;
525
54
    }
526
54
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
93.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
93.3k
    } else {
519
93.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
93.3k
        ss->id = operator_id();
521
93.4k
        for (auto& dest : dests_id()) {
522
93.4k
            ss->related_op_ids.insert(dest);
523
93.4k
        }
524
93.3k
        return ss;
525
93.3k
    }
526
93.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
172
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
172
    } else {
519
172
        auto ss = LocalStateType::SharedStateType::create_shared();
520
172
        ss->id = operator_id();
521
172
        for (auto& dest : dests_id()) {
522
172
            ss->related_op_ids.insert(dest);
523
172
        }
524
172
        return ss;
525
172
    }
526
172
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
504k
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
504k
    } else {
519
504k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
504k
        ss->id = operator_id();
521
504k
        for (auto& dest : dests_id()) {
522
500k
            ss->related_op_ids.insert(dest);
523
500k
        }
524
504k
        return ss;
525
504k
    }
526
504k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
7.40k
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
7.40k
    } else {
519
7.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7.40k
        ss->id = operator_id();
521
7.40k
        for (auto& dest : dests_id()) {
522
7.39k
            ss->related_op_ids.insert(dest);
523
7.39k
        }
524
7.40k
        return ss;
525
7.40k
    }
526
7.40k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
613
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
613
    } else {
519
613
        auto ss = LocalStateType::SharedStateType::create_shared();
520
613
        ss->id = operator_id();
521
614
        for (auto& dest : dests_id()) {
522
614
            ss->related_op_ids.insert(dest);
523
614
        }
524
613
        return ss;
525
613
    }
526
613
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_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.63k
        for (auto& dest : dests_id()) {
522
2.63k
            ss->related_op_ids.insert(dest);
523
2.63k
        }
524
2.62k
        return ss;
525
2.62k
    }
526
2.62k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.50k
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.50k
    } else {
519
2.50k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.50k
        ss->id = operator_id();
521
2.51k
        for (auto& dest : dests_id()) {
522
2.51k
            ss->related_op_ids.insert(dest);
523
2.51k
        }
524
2.50k
        return ss;
525
2.50k
    }
526
2.50k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
559
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
559
    } else {
519
559
        auto ss = LocalStateType::SharedStateType::create_shared();
520
559
        ss->id = operator_id();
521
559
        for (auto& dest : dests_id()) {
522
557
            ss->related_op_ids.insert(dest);
523
557
        }
524
559
        return ss;
525
559
    }
526
559
}
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.10M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.10M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.10M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.10M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.10M
    return Status::OK();
534
2.10M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
96.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
96.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
96.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
96.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
96.2k
    return Status::OK();
534
96.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
247k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
247k
    auto local_state = LocalStateType::create_unique(state, this);
531
247k
    RETURN_IF_ERROR(local_state->init(state, info));
532
247k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
247k
    return Status::OK();
534
247k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
126
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
126
    auto local_state = LocalStateType::create_unique(state, this);
531
126
    RETURN_IF_ERROR(local_state->init(state, info));
532
126
    state->emplace_local_state(operator_id(), std::move(local_state));
533
126
    return Status::OK();
534
126
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.07k
    return Status::OK();
534
3.07k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
11.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
11.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
11.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
11.3k
    return Status::OK();
534
11.3k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
11.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
11.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
11.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
11.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
11.2k
    return Status::OK();
534
11.2k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
36
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
36
    auto local_state = LocalStateType::create_unique(state, this);
531
36
    RETURN_IF_ERROR(local_state->init(state, info));
532
36
    state->emplace_local_state(operator_id(), std::move(local_state));
533
36
    return Status::OK();
534
36
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
185k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
185k
    auto local_state = LocalStateType::create_unique(state, this);
531
185k
    RETURN_IF_ERROR(local_state->init(state, info));
532
185k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
185k
    return Status::OK();
534
185k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
92.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
92.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
92.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
92.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
92.7k
    return Status::OK();
534
92.7k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
78.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
78.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
78.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
78.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
78.2k
    return Status::OK();
534
78.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
154
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
154
    auto local_state = LocalStateType::create_unique(state, this);
531
154
    RETURN_IF_ERROR(local_state->init(state, info));
532
154
    state->emplace_local_state(operator_id(), std::move(local_state));
533
154
    return Status::OK();
534
154
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.57k
    return Status::OK();
534
3.57k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
300k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
300k
    auto local_state = LocalStateType::create_unique(state, this);
531
300k
    RETURN_IF_ERROR(local_state->init(state, info));
532
300k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
300k
    return Status::OK();
534
300k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.35k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.35k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.35k
    return Status::OK();
534
1.35k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.34k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.34k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.34k
    return Status::OK();
534
7.34k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
30
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
30
    auto local_state = LocalStateType::create_unique(state, this);
531
30
    RETURN_IF_ERROR(local_state->init(state, info));
532
30
    state->emplace_local_state(operator_id(), std::move(local_state));
533
30
    return Status::OK();
534
30
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.61k
    return Status::OK();
534
1.61k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.2k
    return Status::OK();
534
55.2k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.42k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.42k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.42k
    return Status::OK();
534
5.42k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
405
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
405
    auto local_state = LocalStateType::create_unique(state, this);
531
405
    RETURN_IF_ERROR(local_state->init(state, info));
532
405
    state->emplace_local_state(operator_id(), std::move(local_state));
533
405
    return Status::OK();
534
405
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.60k
    return Status::OK();
534
2.60k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.46k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.46k
    return Status::OK();
534
2.46k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
389
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
389
    auto local_state = LocalStateType::create_unique(state, this);
531
389
    RETURN_IF_ERROR(local_state->init(state, info));
532
389
    state->emplace_local_state(operator_id(), std::move(local_state));
533
389
    return Status::OK();
534
389
}
_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.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.3k
    return Status::OK();
534
10.3k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
651k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
651k
    auto local_state = LocalStateType::create_unique(state, this);
531
651k
    RETURN_IF_ERROR(local_state->init(state, info));
532
651k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
651k
    return Status::OK();
534
651k
}
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
796
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
796
    auto local_state = LocalStateType::create_unique(state, this);
531
796
    RETURN_IF_ERROR(local_state->init(state, info));
532
796
    state->emplace_local_state(operator_id(), std::move(local_state));
533
796
    return Status::OK();
534
796
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.19k
    return Status::OK();
534
1.19k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.56k
    return Status::OK();
534
6.56k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
324k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
324k
    auto local_state = LocalStateType::create_unique(state, this);
531
324k
    RETURN_IF_ERROR(local_state->init(state, info));
532
324k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
324k
    return Status::OK();
534
324k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.80M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.09M
        : _num_rows_returned(0),
542
2.09M
          _rows_returned_counter(nullptr),
543
2.09M
          _parent(parent),
544
2.09M
          _state(state),
545
2.09M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.11M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.11M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.11M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.11M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.11M
    _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.11M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.11M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.11M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.11M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.11M
    if constexpr (!is_fake_shared) {
560
1.20M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
741k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
741k
                                    .first.get()
563
741k
                                    ->template cast<SharedStateArg>();
564
565
741k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
741k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
741k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
741k
        } else if (info.shared_state) {
569
395k
            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
395k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
395k
            _dependency = _shared_state->create_source_dependency(
576
395k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
395k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
395k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
395k
        } else {
580
69.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.94k
                DCHECK(false);
582
7.94k
            }
583
69.7k
        }
584
1.20M
    }
585
586
2.11M
    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.11M
    _rows_returned_counter =
591
2.11M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.11M
    _blocks_returned_counter =
593
2.11M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.11M
    _output_block_bytes_counter =
595
2.11M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.11M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.11M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.11M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.11M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.11M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.11M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.11M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.11M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.11M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.11M
    _memory_used_counter =
606
2.11M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.11M
    _common_profile->add_info_string("IsColocate",
608
2.11M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.11M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.11M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.11M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.11M
    return Status::OK();
613
2.11M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
96.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
96.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
96.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
96.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
96.5k
    _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
96.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
96.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
96.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
96.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
96.5k
    if constexpr (!is_fake_shared) {
560
96.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
15.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
15.9k
                                    .first.get()
563
15.9k
                                    ->template cast<SharedStateArg>();
564
565
15.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
15.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
15.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
80.6k
        } 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
79.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
79.4k
            _dependency = _shared_state->create_source_dependency(
576
79.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
79.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
79.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
79.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.21k
        }
584
96.5k
    }
585
586
96.5k
    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
96.5k
    _rows_returned_counter =
591
96.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
96.5k
    _blocks_returned_counter =
593
96.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
96.5k
    _output_block_bytes_counter =
595
96.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
96.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
96.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
96.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
96.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
96.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
96.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
96.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
96.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
96.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
96.5k
    _memory_used_counter =
606
96.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
96.5k
    _common_profile->add_info_string("IsColocate",
608
96.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
96.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
96.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
96.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
96.5k
    return Status::OK();
613
96.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
2
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2
    _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
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2
    _operator_profile->add_child(_common_profile.get(), true);
557
2
    _operator_profile->add_child(_custom_profile.get(), true);
558
2
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2
    if constexpr (!is_fake_shared) {
560
2
        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
2
        } 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
2
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
2
            _dependency = _shared_state->create_source_dependency(
576
2
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
2
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
2
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
2
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
2
    }
585
586
2
    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
    _rows_returned_counter =
591
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2
    _blocks_returned_counter =
593
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2
    _output_block_bytes_counter =
595
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2
    _memory_used_counter =
606
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2
    _common_profile->add_info_string("IsColocate",
608
2
                                     std::to_string(_parent->is_colocated_operator()));
609
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2
    return Status::OK();
613
2
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
197k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
197k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
197k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
197k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
197k
    _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
197k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
197k
    _operator_profile->add_child(_common_profile.get(), true);
557
197k
    _operator_profile->add_child(_custom_profile.get(), true);
558
197k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
197k
    if constexpr (!is_fake_shared) {
560
197k
        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
197k
        } 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
190k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
190k
            _dependency = _shared_state->create_source_dependency(
576
190k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
190k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
190k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
190k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6.64k
        }
584
197k
    }
585
586
197k
    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
197k
    _rows_returned_counter =
591
197k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
197k
    _blocks_returned_counter =
593
197k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
197k
    _output_block_bytes_counter =
595
197k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
197k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
197k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
197k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
197k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
197k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
197k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
197k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
197k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
197k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
197k
    _memory_used_counter =
606
197k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
197k
    _common_profile->add_info_string("IsColocate",
608
197k
                                     std::to_string(_parent->is_colocated_operator()));
609
197k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
197k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
197k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
197k
    return Status::OK();
613
197k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
36
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
36
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
36
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
36
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
36
    _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
36
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
36
    _operator_profile->add_child(_common_profile.get(), true);
557
36
    _operator_profile->add_child(_custom_profile.get(), true);
558
36
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
36
    if constexpr (!is_fake_shared) {
560
36
        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
36
        } 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
36
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
36
            _dependency = _shared_state->create_source_dependency(
576
36
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
36
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
36
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
36
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
36
    }
585
586
36
    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
36
    _rows_returned_counter =
591
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
36
    _blocks_returned_counter =
593
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
36
    _output_block_bytes_counter =
595
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
36
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
36
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
36
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
36
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
36
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
36
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
36
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
36
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
36
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
36
    _memory_used_counter =
606
36
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
36
    _common_profile->add_info_string("IsColocate",
608
36
                                     std::to_string(_parent->is_colocated_operator()));
609
36
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
36
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
36
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
36
    return Status::OK();
613
36
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
7.39k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
7.39k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
7.39k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
7.39k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
7.39k
    _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
7.39k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
7.39k
    _operator_profile->add_child(_common_profile.get(), true);
557
7.39k
    _operator_profile->add_child(_custom_profile.get(), true);
558
7.39k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
7.39k
    if constexpr (!is_fake_shared) {
560
7.39k
        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
7.39k
        } 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
7.28k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
7.28k
            _dependency = _shared_state->create_source_dependency(
576
7.28k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
7.28k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
7.28k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
7.28k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
105
        }
584
7.39k
    }
585
586
7.39k
    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
7.39k
    _rows_returned_counter =
591
7.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
7.39k
    _blocks_returned_counter =
593
7.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
7.39k
    _output_block_bytes_counter =
595
7.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.39k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
7.39k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
7.39k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
7.39k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
7.39k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
7.39k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
7.39k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
7.39k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
7.39k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
7.39k
    _memory_used_counter =
606
7.39k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
7.39k
    _common_profile->add_info_string("IsColocate",
608
7.39k
                                     std::to_string(_parent->is_colocated_operator()));
609
7.39k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
7.39k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
7.39k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
7.39k
    return Status::OK();
613
7.39k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
11.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
11.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
11.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
11.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
11.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
11.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
11.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
11.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
11.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
11.4k
    if constexpr (!is_fake_shared) {
560
11.4k
        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
11.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
10.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
10.9k
            _dependency = _shared_state->create_source_dependency(
576
10.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
10.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
10.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
496
        }
584
11.4k
    }
585
586
11.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
11.4k
    _rows_returned_counter =
591
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
11.4k
    _blocks_returned_counter =
593
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
11.4k
    _output_block_bytes_counter =
595
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
11.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
11.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
11.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
11.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
11.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
11.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
11.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
11.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
11.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
11.4k
    _memory_used_counter =
606
11.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
11.4k
    _common_profile->add_info_string("IsColocate",
608
11.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
11.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
11.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
11.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
11.4k
    return Status::OK();
613
11.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
93.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
93.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
93.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
93.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
93.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
93.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
93.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
93.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
93.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
93.1k
    if constexpr (!is_fake_shared) {
560
93.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
93.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
90.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
90.9k
            _dependency = _shared_state->create_source_dependency(
576
90.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
90.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
90.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
90.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.21k
        }
584
93.1k
    }
585
586
93.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
93.1k
    _rows_returned_counter =
591
93.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
93.1k
    _blocks_returned_counter =
593
93.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
93.1k
    _output_block_bytes_counter =
595
93.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
93.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
93.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
93.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
93.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
93.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
93.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
93.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
93.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
93.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
93.1k
    _memory_used_counter =
606
93.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
93.1k
    _common_profile->add_info_string("IsColocate",
608
93.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
93.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
93.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
93.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
93.1k
    return Status::OK();
613
93.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
78.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
78.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
78.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
78.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
78.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
78.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
78.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
78.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
78.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
78.2k
    if constexpr (!is_fake_shared) {
560
78.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
78.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
78.1k
                                    .first.get()
563
78.1k
                                    ->template cast<SharedStateArg>();
564
565
78.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
78.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
78.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
78.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
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
59
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
59
        }
584
78.2k
    }
585
586
78.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
78.2k
    _rows_returned_counter =
591
78.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
78.2k
    _blocks_returned_counter =
593
78.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
78.2k
    _output_block_bytes_counter =
595
78.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
78.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
78.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
78.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
78.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
78.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
78.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
78.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
78.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
78.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
78.2k
    _memory_used_counter =
606
78.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
78.2k
    _common_profile->add_info_string("IsColocate",
608
78.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
78.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
78.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
78.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
78.2k
    return Status::OK();
613
78.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
154
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
154
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
154
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
154
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
154
    _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
154
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
154
    _operator_profile->add_child(_common_profile.get(), true);
557
154
    _operator_profile->add_child(_custom_profile.get(), true);
558
154
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
154
    if constexpr (!is_fake_shared) {
560
154
        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
154
        } 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
154
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
154
            _dependency = _shared_state->create_source_dependency(
576
154
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
154
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
154
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
154
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
154
    }
585
586
154
    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
154
    _rows_returned_counter =
591
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
154
    _blocks_returned_counter =
593
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
154
    _output_block_bytes_counter =
595
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
154
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
154
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
154
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
154
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
154
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
154
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
154
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
154
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
154
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
154
    _memory_used_counter =
606
154
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
154
    _common_profile->add_info_string("IsColocate",
608
154
                                     std::to_string(_parent->is_colocated_operator()));
609
154
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
154
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
154
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
154
    return Status::OK();
613
154
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
904k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
904k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
904k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
904k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
904k
    _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
904k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
904k
    _operator_profile->add_child(_common_profile.get(), true);
557
904k
    _operator_profile->add_child(_custom_profile.get(), true);
558
904k
    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
904k
    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
904k
    _rows_returned_counter =
591
904k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
904k
    _blocks_returned_counter =
593
904k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
904k
    _output_block_bytes_counter =
595
904k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
904k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
904k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
904k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
904k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
904k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
904k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
904k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
904k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
904k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
904k
    _memory_used_counter =
606
904k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
904k
    _common_profile->add_info_string("IsColocate",
608
904k
                                     std::to_string(_parent->is_colocated_operator()));
609
904k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
904k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
904k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
904k
    return Status::OK();
613
904k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.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
55.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.1k
    if constexpr (!is_fake_shared) {
560
55.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
55.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
4.31k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.31k
            _dependency = _shared_state->create_source_dependency(
576
4.31k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.31k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.31k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50.8k
        }
584
55.1k
    }
585
586
55.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
55.1k
    _rows_returned_counter =
591
55.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.1k
    _blocks_returned_counter =
593
55.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.1k
    _output_block_bytes_counter =
595
55.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.1k
    _memory_used_counter =
606
55.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.1k
    _common_profile->add_info_string("IsColocate",
608
55.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.1k
    return Status::OK();
613
55.1k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
38
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
38
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
38
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
38
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
38
    _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
38
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
38
    _operator_profile->add_child(_common_profile.get(), true);
557
38
    _operator_profile->add_child(_custom_profile.get(), true);
558
38
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
38
    if constexpr (!is_fake_shared) {
560
38
        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
38
        } 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
38
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
38
            _dependency = _shared_state->create_source_dependency(
576
38
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
38
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
38
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
38
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
38
    }
585
586
38
    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
38
    _rows_returned_counter =
591
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
38
    _blocks_returned_counter =
593
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
38
    _output_block_bytes_counter =
595
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
38
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
38
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
38
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
38
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
38
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
38
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
38
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
38
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
38
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
38
    _memory_used_counter =
606
38
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
38
    _common_profile->add_info_string("IsColocate",
608
38
                                     std::to_string(_parent->is_colocated_operator()));
609
38
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
38
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
38
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
38
    return Status::OK();
613
38
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.45k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.45k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.45k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.45k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.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
5.45k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.45k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.45k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.45k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.45k
    if constexpr (!is_fake_shared) {
560
5.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
5.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
5.41k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.41k
            _dependency = _shared_state->create_source_dependency(
576
5.41k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.41k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.41k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.41k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
44
        }
584
5.45k
    }
585
586
5.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
5.45k
    _rows_returned_counter =
591
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.45k
    _blocks_returned_counter =
593
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.45k
    _output_block_bytes_counter =
595
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.45k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.45k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.45k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.45k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.45k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.45k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.45k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.45k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.45k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.45k
    _memory_used_counter =
606
5.45k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.45k
    _common_profile->add_info_string("IsColocate",
608
5.45k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.45k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.45k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.45k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.45k
    return Status::OK();
613
5.45k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
612
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
612
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
612
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
612
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
612
    _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
612
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
612
    _operator_profile->add_child(_common_profile.get(), true);
557
612
    _operator_profile->add_child(_custom_profile.get(), true);
558
612
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
612
    if constexpr (!is_fake_shared) {
560
612
        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
612
        } 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
610
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
610
            _dependency = _shared_state->create_source_dependency(
576
610
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
610
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
610
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
610
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
612
    }
585
586
612
    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
612
    _rows_returned_counter =
591
612
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
612
    _blocks_returned_counter =
593
612
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
612
    _output_block_bytes_counter =
595
612
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
612
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
612
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
612
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
612
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
612
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
612
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
612
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
612
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
612
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
612
    _memory_used_counter =
606
612
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
612
    _common_profile->add_info_string("IsColocate",
608
612
                                     std::to_string(_parent->is_colocated_operator()));
609
612
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
612
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
612
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
612
    return Status::OK();
613
612
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.13k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.13k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.13k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.13k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.13k
    _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.13k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.13k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.13k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.13k
    if constexpr (!is_fake_shared) {
560
5.13k
        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.13k
        } 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.89k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.89k
            _dependency = _shared_state->create_source_dependency(
576
4.89k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.89k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.89k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.89k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
238
        }
584
5.13k
    }
585
586
5.13k
    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.13k
    _rows_returned_counter =
591
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.13k
    _blocks_returned_counter =
593
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.13k
    _output_block_bytes_counter =
595
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.13k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.13k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.13k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.13k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.13k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.13k
    _memory_used_counter =
606
5.13k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.13k
    _common_profile->add_info_string("IsColocate",
608
5.13k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.13k
    return Status::OK();
613
5.13k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
655k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
655k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
655k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
655k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
655k
    _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
655k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
655k
    _operator_profile->add_child(_common_profile.get(), true);
557
655k
    _operator_profile->add_child(_custom_profile.get(), true);
558
655k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
655k
    if constexpr (!is_fake_shared) {
560
655k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
647k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
647k
                                    .first.get()
563
647k
                                    ->template cast<SharedStateArg>();
564
565
647k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
647k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
647k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
647k
        } 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
7.94k
        } else {
580
7.94k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.94k
                DCHECK(false);
582
7.94k
            }
583
7.94k
        }
584
655k
    }
585
586
655k
    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
655k
    _rows_returned_counter =
591
655k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
655k
    _blocks_returned_counter =
593
655k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
655k
    _output_block_bytes_counter =
595
655k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
655k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
655k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
655k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
655k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
655k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
655k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
655k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
655k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
655k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
655k
    _memory_used_counter =
606
655k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
655k
    _common_profile->add_info_string("IsColocate",
608
655k
                                     std::to_string(_parent->is_colocated_operator()));
609
655k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
655k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
655k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
655k
    return Status::OK();
613
655k
}
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.12M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.12M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.42M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
307k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
307k
    }
621
2.12M
    if (_parent->has_projection()) {
622
414k
        const auto& projection = *_parent->_projection;
623
414k
        _projections.resize(projection.projections.size());
624
2.51M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.09M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.09M
        }
627
414k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
430k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
214k
            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
15.9k
        }
635
414k
    }
636
2.12M
    return Status::OK();
637
2.12M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
96.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
96.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
98.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.47k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.47k
    }
621
96.8k
    if (_parent->has_projection()) {
622
96.8k
        const auto& projection = *_parent->_projection;
623
96.8k
        _projections.resize(projection.projections.size());
624
482k
        for (size_t i = 0; i < _projections.size(); i++) {
625
385k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
385k
        }
627
96.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
104k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7.43k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
157k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
149k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
149k
                        state, _intermediate_projections[i][j]));
633
149k
            }
634
7.43k
        }
635
96.8k
    }
636
96.8k
    return Status::OK();
637
96.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    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
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
198k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
198k
    _conjuncts.resize(_parent->_conjuncts.size());
618
198k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
198k
    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
198k
    return Status::OK();
637
198k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
36
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
36
    _conjuncts.resize(_parent->_conjuncts.size());
618
36
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
36
    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
36
    return Status::OK();
637
36
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
7.40k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
7.40k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.53k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
122
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
122
    }
621
7.40k
    if (_parent->has_projection()) {
622
7.40k
        const auto& projection = *_parent->_projection;
623
7.40k
        _projections.resize(projection.projections.size());
624
33.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
26.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
26.5k
        }
627
7.40k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.47k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
71
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
486
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
415
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
415
                        state, _intermediate_projections[i][j]));
633
415
            }
634
71
        }
635
7.40k
    }
636
7.40k
    return Status::OK();
637
7.40k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
12.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
826
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
826
    }
621
11.7k
    if (_parent->has_projection()) {
622
7.28k
        const auto& projection = *_parent->_projection;
623
7.28k
        _projections.resize(projection.projections.size());
624
27.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.6k
        }
627
7.28k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.37k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
88
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
667
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
579
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
579
                        state, _intermediate_projections[i][j]));
633
579
            }
634
88
        }
635
7.28k
    }
636
11.7k
    return Status::OK();
637
11.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
93.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
93.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
95.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.11k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.11k
    }
621
93.6k
    if (_parent->has_projection()) {
622
30.5k
        const auto& projection = *_parent->_projection;
623
30.5k
        _projections.resize(projection.projections.size());
624
276k
        for (size_t i = 0; i < _projections.size(); i++) {
625
245k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
245k
        }
627
30.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
247
            _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.46k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.46k
                        state, _intermediate_projections[i][j]));
633
1.46k
            }
634
247
        }
635
30.5k
    }
636
93.6k
    return Status::OK();
637
93.6k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
78.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
78.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
78.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
14
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
14
    }
621
78.2k
    if (_parent->has_projection()) {
622
103
        const auto& projection = *_parent->_projection;
623
103
        _projections.resize(projection.projections.size());
624
359
        for (size_t i = 0; i < _projections.size(); i++) {
625
256
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
256
        }
627
103
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
103
        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
103
    }
636
78.2k
    return Status::OK();
637
78.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
162
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
162
    _conjuncts.resize(_parent->_conjuncts.size());
618
162
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
162
    if (_parent->has_projection()) {
622
126
        const auto& projection = *_parent->_projection;
623
126
        _projections.resize(projection.projections.size());
624
378
        for (size_t i = 0; i < _projections.size(); i++) {
625
252
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
252
        }
627
126
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
126
        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
126
    }
636
162
    return Status::OK();
637
162
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
908k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
908k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.21M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
302k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
302k
    }
621
908k
    if (_parent->has_projection()) {
622
260k
        const auto& projection = *_parent->_projection;
623
260k
        _projections.resize(projection.projections.size());
624
1.57M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.31M
        }
627
260k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
268k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7.95k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
49.4k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
41.5k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
41.5k
                        state, _intermediate_projections[i][j]));
633
41.5k
            }
634
7.95k
        }
635
260k
    }
636
908k
    return Status::OK();
637
908k
}
_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
112k
        for (size_t i = 0; i < _projections.size(); i++) {
625
100k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
100k
        }
627
11.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
202
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.78k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.58k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.58k
                        state, _intermediate_projections[i][j]));
633
4.58k
            }
634
202
        }
635
11.7k
    }
636
55.4k
    return Status::OK();
637
55.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
36
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
36
    _conjuncts.resize(_parent->_conjuncts.size());
618
36
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
36
    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
36
    return Status::OK();
637
36
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.45k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.45k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.16k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
717
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
717
    }
621
5.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
5.45k
    return Status::OK();
637
5.45k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
613
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
613
    _conjuncts.resize(_parent->_conjuncts.size());
618
613
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
613
    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
613
    return Status::OK();
637
613
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.19k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.19k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.19k
    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.19k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
227
        for (size_t i = 0; i < _projections.size(); i++) {
625
167
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
167
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        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
60
    }
636
5.19k
    return Status::OK();
637
5.19k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
658k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
658k
    _conjuncts.resize(_parent->_conjuncts.size());
618
658k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
658k
    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
658k
    return Status::OK();
637
658k
}
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
7.05k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.05k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.05k
    _terminated = true;
645
7.05k
    return Status::OK();
646
7.05k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
340
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
340
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
340
    _terminated = true;
645
340
    return Status::OK();
646
340
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
44
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
44
    _terminated = true;
645
44
    return Status::OK();
646
44
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
152
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
152
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
152
    _terminated = true;
645
152
    return Status::OK();
646
152
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
5.40k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.40k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.40k
    _terminated = true;
645
5.40k
    return Status::OK();
646
5.40k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
24
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
24
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
24
    _terminated = true;
645
24
    return Status::OK();
646
24
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
173
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
173
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
173
    _terminated = true;
645
173
    return Status::OK();
646
173
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
846
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
846
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
846
    _terminated = true;
645
846
    return Status::OK();
646
846
}
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.34M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.34M
    if (_closed) {
651
230k
        return Status::OK();
652
230k
    }
653
2.11M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.21M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.21M
    }
656
2.11M
    _closed = true;
657
2.11M
    return Status::OK();
658
2.34M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
96.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
96.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
96.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
96.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
96.7k
    }
656
96.7k
    _closed = true;
657
96.7k
    return Status::OK();
658
96.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
8
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
8
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
8
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8
    }
656
8
    _closed = true;
657
8
    return Status::OK();
658
8
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
394k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
394k
    if (_closed) {
651
197k
        return Status::OK();
652
197k
    }
653
196k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
196k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
196k
    }
656
196k
    _closed = true;
657
196k
    return Status::OK();
658
394k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
36
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
36
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
36
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
36
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
36
    }
656
36
    _closed = true;
657
36
    return Status::OK();
658
36
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7.40k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7.40k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7.40k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.40k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.40k
    }
656
7.40k
    _closed = true;
657
7.40k
    return Status::OK();
658
7.40k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
23.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
23.5k
    if (_closed) {
651
11.8k
        return Status::OK();
652
11.8k
    }
653
11.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
11.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
11.6k
    }
656
11.6k
    _closed = true;
657
11.6k
    return Status::OK();
658
23.5k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
93.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
93.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
93.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
93.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
93.2k
    }
656
93.2k
    _closed = true;
657
93.2k
    return Status::OK();
658
93.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
77.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
77.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
77.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
77.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
77.9k
    }
656
77.9k
    _closed = true;
657
77.9k
    return Status::OK();
658
77.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
152
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
152
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
152
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
152
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
152
    }
656
152
    _closed = true;
657
152
    return Status::OK();
658
152
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
923k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
923k
    if (_closed) {
651
14.6k
        return Status::OK();
652
14.6k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
909k
    _closed = true;
657
909k
    return Status::OK();
658
923k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.4k
    }
656
55.4k
    _closed = true;
657
55.4k
    return Status::OK();
658
55.4k
}
_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
5.42k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.42k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.42k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.42k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.42k
    }
656
5.42k
    _closed = true;
657
5.42k
    return Status::OK();
658
5.42k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
819
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
819
    if (_closed) {
651
410
        return Status::OK();
652
410
    }
653
409
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
409
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
409
    }
656
409
    _closed = true;
657
409
    return Status::OK();
658
819
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.6k
    if (_closed) {
651
5.45k
        return Status::OK();
652
5.45k
    }
653
5.17k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.17k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.17k
    }
656
5.17k
    _closed = true;
657
5.17k
    return Status::OK();
658
10.6k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
659k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
659k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
659k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
659k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
659k
    }
656
659k
    _closed = true;
657
659k
    return Status::OK();
658
659k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
336
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
336
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
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
336
}
659
660
template <typename SharedState>
661
1.81M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.81M
    _operator_profile =
664
1.81M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.81M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.81M
    _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.81M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.81M
    _operator_profile->add_child(_common_profile, true);
673
1.81M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.81M
    _operator_profile->set_metadata(_parent->node_id());
676
1.81M
    _wait_for_finish_dependency_timer =
677
1.81M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.81M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.81M
    if constexpr (!is_fake_shared) {
680
1.30M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.30M
            info.shared_state_map.end()) {
682
353k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
259k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
259k
            }
685
353k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
353k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
353k
                                                  ? 0
688
353k
                                                  : info.task_idx]
689
353k
                                  .get();
690
353k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
953k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
953k
            _shared_state = info.shared_state->template cast<SharedState>();
696
953k
            _dependency = _shared_state->create_sink_dependency(
697
953k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
953k
        }
699
1.30M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.30M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.30M
    }
702
703
1.81M
    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.81M
    _rows_input_counter =
708
1.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.81M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.81M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.81M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.81M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.81M
    _memory_used_counter =
714
1.81M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.81M
    _common_profile->add_info_string("IsColocate",
716
1.81M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.81M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.81M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.81M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.81M
    return Status::OK();
721
1.81M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
192k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
192k
    _operator_profile =
664
192k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
192k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
192k
    _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
192k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
192k
    _operator_profile->add_child(_common_profile, true);
673
192k
    _operator_profile->add_child(_custom_profile, true);
674
675
192k
    _operator_profile->set_metadata(_parent->node_id());
676
192k
    _wait_for_finish_dependency_timer =
677
192k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
192k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
192k
    if constexpr (!is_fake_shared) {
680
192k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
192k
            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
16.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
16.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
16.5k
                                                  ? 0
688
16.5k
                                                  : info.task_idx]
689
16.5k
                                  .get();
690
16.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
176k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
176k
            _shared_state = info.shared_state->template cast<SharedState>();
696
176k
            _dependency = _shared_state->create_sink_dependency(
697
176k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
176k
        }
699
192k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
192k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
192k
    }
702
703
192k
    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
192k
    _rows_input_counter =
708
192k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
192k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
192k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
192k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
192k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
192k
    _memory_used_counter =
714
192k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
192k
    _common_profile->add_info_string("IsColocate",
716
192k
                                     std::to_string(_parent->is_colocated_operator()));
717
192k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
192k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
192k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
192k
    return Status::OK();
721
192k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4
    _operator_profile =
664
4
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4
    _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
4
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4
    _operator_profile->add_child(_common_profile, true);
673
4
    _operator_profile->add_child(_custom_profile, true);
674
675
4
    _operator_profile->set_metadata(_parent->node_id());
676
4
    _wait_for_finish_dependency_timer =
677
4
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4
    if constexpr (!is_fake_shared) {
680
4
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4
            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
4
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4
            _shared_state = info.shared_state->template cast<SharedState>();
696
4
            _dependency = _shared_state->create_sink_dependency(
697
4
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4
        }
699
4
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4
    }
702
703
4
    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
4
    _rows_input_counter =
708
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4
    _memory_used_counter =
714
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4
    _common_profile->add_info_string("IsColocate",
716
4
                                     std::to_string(_parent->is_colocated_operator()));
717
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4
    return Status::OK();
721
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
198k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
198k
    _operator_profile =
664
198k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
198k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
198k
    _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
198k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
198k
    _operator_profile->add_child(_common_profile, true);
673
198k
    _operator_profile->add_child(_custom_profile, true);
674
675
198k
    _operator_profile->set_metadata(_parent->node_id());
676
198k
    _wait_for_finish_dependency_timer =
677
198k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
198k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
198k
    if constexpr (!is_fake_shared) {
680
198k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
198k
            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
198k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
198k
            _shared_state = info.shared_state->template cast<SharedState>();
696
198k
            _dependency = _shared_state->create_sink_dependency(
697
198k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
198k
        }
699
198k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
198k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
198k
    }
702
703
198k
    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
198k
    _rows_input_counter =
708
198k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
198k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
198k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
198k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
198k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
198k
    _memory_used_counter =
714
198k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
198k
    _common_profile->add_info_string("IsColocate",
716
198k
                                     std::to_string(_parent->is_colocated_operator()));
717
198k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
198k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
198k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
198k
    return Status::OK();
721
198k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
50
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
50
    _operator_profile =
664
50
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
50
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
50
    _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
50
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
50
    _operator_profile->add_child(_common_profile, true);
673
50
    _operator_profile->add_child(_custom_profile, true);
674
675
50
    _operator_profile->set_metadata(_parent->node_id());
676
50
    _wait_for_finish_dependency_timer =
677
50
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
50
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
50
    if constexpr (!is_fake_shared) {
680
50
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
50
            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
50
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
50
            _shared_state = info.shared_state->template cast<SharedState>();
696
50
            _dependency = _shared_state->create_sink_dependency(
697
50
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
50
        }
699
50
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
50
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
50
    }
702
703
50
    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
50
    _rows_input_counter =
708
50
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
50
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
50
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
50
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
50
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
50
    _memory_used_counter =
714
50
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
50
    _common_profile->add_info_string("IsColocate",
716
50
                                     std::to_string(_parent->is_colocated_operator()));
717
50
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
50
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
50
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
50
    return Status::OK();
721
50
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.37k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.37k
    _operator_profile =
664
7.37k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.37k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.37k
    _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
7.37k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.37k
    _operator_profile->add_child(_common_profile, true);
673
7.37k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.37k
    _operator_profile->set_metadata(_parent->node_id());
676
7.37k
    _wait_for_finish_dependency_timer =
677
7.37k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.37k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.37k
    if constexpr (!is_fake_shared) {
680
7.37k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.37k
            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
7.37k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.37k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.37k
            _dependency = _shared_state->create_sink_dependency(
697
7.37k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.37k
        }
699
7.37k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.37k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.37k
    }
702
703
7.37k
    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
7.37k
    _rows_input_counter =
708
7.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.37k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.37k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.37k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.37k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.37k
    _memory_used_counter =
714
7.37k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.37k
    _common_profile->add_info_string("IsColocate",
716
7.37k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.37k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.37k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.37k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.37k
    return Status::OK();
721
7.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.6k
    _operator_profile =
664
11.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.6k
    _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
11.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.6k
    _operator_profile->add_child(_common_profile, true);
673
11.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.6k
    _operator_profile->set_metadata(_parent->node_id());
676
11.6k
    _wait_for_finish_dependency_timer =
677
11.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.6k
    if constexpr (!is_fake_shared) {
680
11.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.6k
            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
11.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.6k
            _dependency = _shared_state->create_sink_dependency(
697
11.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.6k
        }
699
11.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.6k
    }
702
703
11.6k
    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
11.6k
    _rows_input_counter =
708
11.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.6k
    _memory_used_counter =
714
11.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.6k
    _common_profile->add_info_string("IsColocate",
716
11.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.6k
    return Status::OK();
721
11.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
93.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
93.2k
    _operator_profile =
664
93.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
93.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
93.2k
    _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
93.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
93.2k
    _operator_profile->add_child(_common_profile, true);
673
93.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
93.2k
    _operator_profile->set_metadata(_parent->node_id());
676
93.2k
    _wait_for_finish_dependency_timer =
677
93.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
93.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
93.2k
    if constexpr (!is_fake_shared) {
680
93.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
93.2k
            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
93.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
93.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
93.2k
            _dependency = _shared_state->create_sink_dependency(
697
93.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
93.2k
        }
699
93.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
93.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
93.2k
    }
702
703
93.2k
    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
93.2k
    _rows_input_counter =
708
93.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
93.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
93.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
93.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
93.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
93.2k
    _memory_used_counter =
714
93.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
93.2k
    _common_profile->add_info_string("IsColocate",
716
93.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
93.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
93.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
93.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
93.2k
    return Status::OK();
721
93.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
78.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
78.0k
    _operator_profile =
664
78.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
78.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
78.0k
    _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
78.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
78.0k
    _operator_profile->add_child(_common_profile, true);
673
78.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
78.0k
    _operator_profile->set_metadata(_parent->node_id());
676
78.0k
    _wait_for_finish_dependency_timer =
677
78.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
78.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
78.0k
    if constexpr (!is_fake_shared) {
680
78.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
78.0k
            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
78.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
78.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
78.0k
                                                  ? 0
688
78.0k
                                                  : info.task_idx]
689
78.0k
                                  .get();
690
78.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
78.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
3
            _shared_state = info.shared_state->template cast<SharedState>();
696
3
            _dependency = _shared_state->create_sink_dependency(
697
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
3
        }
699
78.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
78.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
78.0k
    }
702
703
78.0k
    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
78.0k
    _rows_input_counter =
708
78.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
78.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
78.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
78.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
78.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
78.0k
    _memory_used_counter =
714
78.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
78.0k
    _common_profile->add_info_string("IsColocate",
716
78.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
78.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
78.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
78.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
78.0k
    return Status::OK();
721
78.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
174
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
174
    _operator_profile =
664
174
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
174
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
174
    _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
174
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
174
    _operator_profile->add_child(_common_profile, true);
673
174
    _operator_profile->add_child(_custom_profile, true);
674
675
174
    _operator_profile->set_metadata(_parent->node_id());
676
174
    _wait_for_finish_dependency_timer =
677
174
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
174
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
174
    if constexpr (!is_fake_shared) {
680
174
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
174
            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
174
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
174
            _shared_state = info.shared_state->template cast<SharedState>();
696
174
            _dependency = _shared_state->create_sink_dependency(
697
174
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
174
        }
699
174
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
174
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
174
    }
702
703
174
    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
174
    _rows_input_counter =
708
174
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
174
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
174
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
174
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
174
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
174
    _memory_used_counter =
714
174
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
174
    _common_profile->add_info_string("IsColocate",
716
174
                                     std::to_string(_parent->is_colocated_operator()));
717
174
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
174
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
174
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
174
    return Status::OK();
721
174
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
504k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
504k
    _operator_profile =
664
504k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
504k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
504k
    _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
504k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
504k
    _operator_profile->add_child(_common_profile, true);
673
504k
    _operator_profile->add_child(_custom_profile, true);
674
675
504k
    _operator_profile->set_metadata(_parent->node_id());
676
504k
    _wait_for_finish_dependency_timer =
677
504k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
504k
    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
504k
    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
504k
    _rows_input_counter =
708
504k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
504k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
504k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
504k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
504k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
504k
    _memory_used_counter =
714
504k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
504k
    _common_profile->add_info_string("IsColocate",
716
504k
                                     std::to_string(_parent->is_colocated_operator()));
717
504k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
504k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
504k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
504k
    return Status::OK();
721
504k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.2k
    _operator_profile =
664
10.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.2k
    _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
10.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.2k
    _operator_profile->add_child(_common_profile, true);
673
10.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.2k
    _operator_profile->set_metadata(_parent->node_id());
676
10.2k
    _wait_for_finish_dependency_timer =
677
10.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.2k
    if constexpr (!is_fake_shared) {
680
10.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.2k
            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
10.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.2k
            _dependency = _shared_state->create_sink_dependency(
697
10.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.2k
        }
699
10.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.2k
    }
702
703
10.2k
    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
10.2k
    _rows_input_counter =
708
10.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.2k
    _memory_used_counter =
714
10.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.2k
    _common_profile->add_info_string("IsColocate",
716
10.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.2k
    return Status::OK();
721
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
611
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
611
    _operator_profile =
664
611
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
611
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
611
    _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
611
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
611
    _operator_profile->add_child(_common_profile, true);
673
611
    _operator_profile->add_child(_custom_profile, true);
674
675
611
    _operator_profile->set_metadata(_parent->node_id());
676
611
    _wait_for_finish_dependency_timer =
677
611
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
611
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
611
    if constexpr (!is_fake_shared) {
680
611
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
611
            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
611
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
611
            _shared_state = info.shared_state->template cast<SharedState>();
696
611
            _dependency = _shared_state->create_sink_dependency(
697
611
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
611
        }
699
611
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
611
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
611
    }
702
703
613
    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
611
    _rows_input_counter =
708
611
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
611
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
611
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
611
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
611
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
611
    _memory_used_counter =
714
611
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
611
    _common_profile->add_info_string("IsColocate",
716
611
                                     std::to_string(_parent->is_colocated_operator()));
717
611
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
611
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
611
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
611
    return Status::OK();
721
611
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.16k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.16k
    _operator_profile =
664
2.16k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.16k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.16k
    _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.16k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.16k
    _operator_profile->add_child(_common_profile, true);
673
2.16k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.16k
    _operator_profile->set_metadata(_parent->node_id());
676
2.16k
    _wait_for_finish_dependency_timer =
677
2.16k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.16k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.16k
    if constexpr (!is_fake_shared) {
680
2.16k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.16k
            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.16k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.16k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.16k
            _dependency = _shared_state->create_sink_dependency(
697
2.16k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.16k
        }
699
2.16k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.16k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.16k
    }
702
703
2.16k
    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.16k
    _rows_input_counter =
708
2.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.16k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.16k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.16k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.16k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.16k
    _memory_used_counter =
714
2.16k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.16k
    _common_profile->add_info_string("IsColocate",
716
2.16k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.16k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.16k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.16k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.16k
    return Status::OK();
721
2.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.6k
    _operator_profile =
664
12.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.6k
    _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
12.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.6k
    _operator_profile->add_child(_common_profile, true);
673
12.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.6k
    _operator_profile->set_metadata(_parent->node_id());
676
12.6k
    _wait_for_finish_dependency_timer =
677
12.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.6k
    if constexpr (!is_fake_shared) {
680
12.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.6k
            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
12.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.6k
            _dependency = _shared_state->create_sink_dependency(
697
12.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.6k
        }
699
12.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.6k
    }
702
703
12.6k
    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
12.6k
    _rows_input_counter =
708
12.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.6k
    _memory_used_counter =
714
12.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.6k
    _common_profile->add_info_string("IsColocate",
716
12.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.6k
    return Status::OK();
721
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
259k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
259k
    _operator_profile =
664
259k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
259k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
259k
    _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
259k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
259k
    _operator_profile->add_child(_common_profile, true);
673
259k
    _operator_profile->add_child(_custom_profile, true);
674
675
259k
    _operator_profile->set_metadata(_parent->node_id());
676
259k
    _wait_for_finish_dependency_timer =
677
259k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
259k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
259k
    if constexpr (!is_fake_shared) {
680
259k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
259k
            info.shared_state_map.end()) {
682
259k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
259k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
259k
            }
685
259k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
259k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
259k
                                                  ? 0
688
259k
                                                  : info.task_idx]
689
259k
                                  .get();
690
259k
            _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
259k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
259k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
259k
    }
702
703
259k
    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
259k
    _rows_input_counter =
708
259k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
259k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
259k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
259k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
259k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
259k
    _memory_used_counter =
714
259k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
259k
    _common_profile->add_info_string("IsColocate",
716
259k
                                     std::to_string(_parent->is_colocated_operator()));
717
259k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
259k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
259k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
259k
    return Status::OK();
721
259k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
441k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
441k
    _operator_profile =
664
441k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
441k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
441k
    _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
441k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
441k
    _operator_profile->add_child(_common_profile, true);
673
441k
    _operator_profile->add_child(_custom_profile, true);
674
675
441k
    _operator_profile->set_metadata(_parent->node_id());
676
441k
    _wait_for_finish_dependency_timer =
677
441k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
441k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
441k
    if constexpr (!is_fake_shared) {
680
441k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
441k
            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
441k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
441k
            _shared_state = info.shared_state->template cast<SharedState>();
696
441k
            _dependency = _shared_state->create_sink_dependency(
697
441k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
441k
        }
699
441k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
441k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
441k
    }
702
703
441k
    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
441k
    _rows_input_counter =
708
441k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
441k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
441k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
441k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
441k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
441k
    _memory_used_counter =
714
441k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
441k
    _common_profile->add_info_string("IsColocate",
716
441k
                                     std::to_string(_parent->is_colocated_operator()));
717
441k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
441k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
441k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
441k
    return Status::OK();
721
441k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
36
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
36
    _operator_profile =
664
36
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
36
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
36
    _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
36
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
36
    _operator_profile->add_child(_common_profile, true);
673
36
    _operator_profile->add_child(_custom_profile, true);
674
675
36
    _operator_profile->set_metadata(_parent->node_id());
676
36
    _wait_for_finish_dependency_timer =
677
36
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
36
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
36
    if constexpr (!is_fake_shared) {
680
36
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
36
            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
36
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
36
            _shared_state = info.shared_state->template cast<SharedState>();
696
36
            _dependency = _shared_state->create_sink_dependency(
697
36
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
36
        }
699
36
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
36
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
36
    }
702
703
36
    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
36
    _rows_input_counter =
708
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
36
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
36
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
36
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
36
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
36
    _memory_used_counter =
714
36
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
36
    _common_profile->add_info_string("IsColocate",
716
36
                                     std::to_string(_parent->is_colocated_operator()));
717
36
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
36
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
36
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
36
    return Status::OK();
721
36
}
_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.81M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.81M
    if (_closed) {
726
4
        return Status::OK();
727
4
    }
728
1.81M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.31M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.31M
    }
731
1.81M
    _closed = true;
732
1.81M
    return Status::OK();
733
1.81M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
192k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
192k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
192k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
192k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
192k
    }
731
192k
    _closed = true;
732
192k
    return Status::OK();
733
192k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2
    }
731
2
    _closed = true;
732
2
    return Status::OK();
733
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
198k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
198k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
198k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
198k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
198k
    }
731
198k
    _closed = true;
732
198k
    return Status::OK();
733
198k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
32
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
32
    if (_closed) {
726
4
        return Status::OK();
727
4
    }
728
28
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
28
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
28
    }
731
28
    _closed = true;
732
28
    return Status::OK();
733
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.38k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.38k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.38k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.38k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.38k
    }
731
7.38k
    _closed = true;
732
7.38k
    return Status::OK();
733
7.38k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.6k
    }
731
11.6k
    _closed = true;
732
11.6k
    return Status::OK();
733
11.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
93.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
93.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
93.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
93.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
93.1k
    }
731
93.1k
    _closed = true;
732
93.1k
    return Status::OK();
733
93.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
77.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
77.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
77.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
77.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
77.8k
    }
731
77.8k
    _closed = true;
732
77.8k
    return Status::OK();
733
77.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
152
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
152
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
152
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
152
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
152
    }
731
152
    _closed = true;
732
152
    return Status::OK();
733
152
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
507k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
507k
    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
507k
    _closed = true;
732
507k
    return Status::OK();
733
507k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.2k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.2k
    }
731
10.2k
    _closed = true;
732
10.2k
    return Status::OK();
733
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
408
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
408
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
408
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
408
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
408
    }
731
408
    _closed = true;
732
408
    return Status::OK();
733
408
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.19k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.19k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.19k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.19k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.19k
    }
731
2.19k
    _closed = true;
732
2.19k
    return Status::OK();
733
2.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.6k
    }
731
12.6k
    _closed = true;
732
12.6k
    return Status::OK();
733
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
260k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
260k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
260k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
260k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
260k
    }
731
260k
    _closed = true;
732
260k
    return Status::OK();
733
260k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
443k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
443k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
443k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
443k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
443k
    }
731
443k
    _closed = true;
732
443k
    return Status::OK();
733
443k
}
_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
7.46k
                                                          bool* eos) {
738
7.46k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.46k
    return pull(state, block, eos);
740
7.46k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
42
                                                          bool* eos) {
738
42
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
42
    return pull(state, block, eos);
740
42
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
7.42k
                                                          bool* eos) {
738
7.42k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.42k
    return pull(state, block, eos);
740
7.42k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
565k
                                                         bool* eos) {
745
565k
    auto& local_state = get_local_state(state);
746
565k
    if (need_more_input_data(state)) {
747
536k
        local_state._child_block->clear_column_data(
748
536k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
536k
                        .num_materialized_slots());
750
536k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
536k
                state, local_state._child_block.get(), &local_state._child_eos));
752
536k
        *eos = local_state._child_eos;
753
536k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
61.3k
            return Status::OK();
755
61.3k
        }
756
474k
        {
757
474k
            SCOPED_TIMER(local_state.exec_time_counter());
758
474k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
474k
        }
760
474k
    }
761
762
504k
    if (!need_more_input_data(state)) {
763
477k
        SCOPED_TIMER(local_state.exec_time_counter());
764
477k
        bool new_eos = false;
765
477k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
477k
        if (new_eos) {
767
393k
            *eos = true;
768
393k
        } else if (!need_more_input_data(state)) {
769
22.5k
            *eos = false;
770
22.5k
        }
771
477k
    }
772
504k
    return Status::OK();
773
504k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
147k
                                                         bool* eos) {
745
147k
    auto& local_state = get_local_state(state);
746
147k
    if (need_more_input_data(state)) {
747
130k
        local_state._child_block->clear_column_data(
748
130k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
130k
                        .num_materialized_slots());
750
130k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
130k
                state, local_state._child_block.get(), &local_state._child_eos));
752
130k
        *eos = local_state._child_eos;
753
130k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
34.5k
            return Status::OK();
755
34.5k
        }
756
95.5k
        {
757
95.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
95.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
95.5k
        }
760
95.5k
    }
761
762
112k
    if (!need_more_input_data(state)) {
763
112k
        SCOPED_TIMER(local_state.exec_time_counter());
764
112k
        bool new_eos = false;
765
112k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
112k
        if (new_eos) {
767
48.3k
            *eos = true;
768
64.4k
        } else if (!need_more_input_data(state)) {
769
9.96k
            *eos = false;
770
9.96k
        }
771
112k
    }
772
112k
    return Status::OK();
773
112k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.48k
                                                         bool* eos) {
745
4.48k
    auto& local_state = get_local_state(state);
746
4.48k
    if (need_more_input_data(state)) {
747
2.57k
        local_state._child_block->clear_column_data(
748
2.57k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.57k
                        .num_materialized_slots());
750
2.57k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.57k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.57k
        *eos = local_state._child_eos;
753
2.57k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
572
            return Status::OK();
755
572
        }
756
2.00k
        {
757
2.00k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.00k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.00k
        }
760
2.00k
    }
761
762
3.92k
    if (!need_more_input_data(state)) {
763
3.92k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.92k
        bool new_eos = false;
765
3.92k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.92k
        if (new_eos) {
767
1.36k
            *eos = true;
768
2.55k
        } else if (!need_more_input_data(state)) {
769
1.91k
            *eos = false;
770
1.91k
        }
771
3.92k
    }
772
3.91k
    return Status::OK();
773
3.91k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.89k
                                                         bool* eos) {
745
1.89k
    auto& local_state = get_local_state(state);
746
1.89k
    if (need_more_input_data(state)) {
747
1.89k
        local_state._child_block->clear_column_data(
748
1.89k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.89k
                        .num_materialized_slots());
750
1.89k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.89k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.89k
        *eos = local_state._child_eos;
753
1.89k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
785
            return Status::OK();
755
785
        }
756
1.11k
        {
757
1.11k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.11k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.11k
        }
760
1.11k
    }
761
762
1.11k
    if (!need_more_input_data(state)) {
763
1.11k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.11k
        bool new_eos = false;
765
1.11k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.11k
        if (new_eos) {
767
796
            *eos = true;
768
796
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.11k
    }
772
1.11k
    return Status::OK();
773
1.11k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.8k
                                                         bool* eos) {
745
16.8k
    auto& local_state = get_local_state(state);
746
16.8k
    if (need_more_input_data(state)) {
747
16.8k
        local_state._child_block->clear_column_data(
748
16.8k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.8k
                        .num_materialized_slots());
750
16.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.8k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.8k
        *eos = local_state._child_eos;
753
16.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
5.46k
            return Status::OK();
755
5.46k
        }
756
11.4k
        {
757
11.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
11.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
11.4k
        }
760
11.4k
    }
761
762
11.4k
    if (!need_more_input_data(state)) {
763
6.62k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.62k
        bool new_eos = false;
765
6.62k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.62k
        if (new_eos) {
767
6.56k
            *eos = true;
768
6.56k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
6.62k
    }
772
11.4k
    return Status::OK();
773
11.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
365k
                                                         bool* eos) {
745
365k
    auto& local_state = get_local_state(state);
746
366k
    if (need_more_input_data(state)) {
747
366k
        local_state._child_block->clear_column_data(
748
366k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
366k
                        .num_materialized_slots());
750
366k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
366k
                state, local_state._child_block.get(), &local_state._child_eos));
752
366k
        *eos = local_state._child_eos;
753
366k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
18.3k
            return Status::OK();
755
18.3k
        }
756
347k
        {
757
347k
            SCOPED_TIMER(local_state.exec_time_counter());
758
347k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
347k
        }
760
347k
    }
761
762
347k
    if (!need_more_input_data(state)) {
763
325k
        SCOPED_TIMER(local_state.exec_time_counter());
764
325k
        bool new_eos = false;
765
325k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
325k
        if (new_eos) {
767
325k
            *eos = true;
768
325k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
325k
    }
772
347k
    return Status::OK();
773
347k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.7k
                                                         bool* eos) {
745
22.7k
    auto& local_state = get_local_state(state);
746
22.7k
    if (need_more_input_data(state)) {
747
12.4k
        local_state._child_block->clear_column_data(
748
12.4k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
12.4k
                        .num_materialized_slots());
750
12.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
12.4k
                state, local_state._child_block.get(), &local_state._child_eos));
752
12.4k
        *eos = local_state._child_eos;
753
12.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
684
            return Status::OK();
755
684
        }
756
11.7k
        {
757
11.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
11.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
11.7k
        }
760
11.7k
    }
761
762
22.0k
    if (!need_more_input_data(state)) {
763
21.3k
        SCOPED_TIMER(local_state.exec_time_counter());
764
21.3k
        bool new_eos = false;
765
21.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
21.3k
        if (new_eos) {
767
7.33k
            *eos = true;
768
14.0k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
21.3k
    }
772
22.0k
    return Status::OK();
773
22.0k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.58k
                                                         bool* eos) {
745
6.58k
    auto& local_state = get_local_state(state);
746
6.58k
    if (need_more_input_data(state)) {
747
6.21k
        local_state._child_block->clear_column_data(
748
6.21k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.21k
                        .num_materialized_slots());
750
6.21k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.21k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.21k
        *eos = local_state._child_eos;
753
6.21k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
915
            return Status::OK();
755
915
        }
756
5.30k
        {
757
5.30k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.30k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.30k
        }
760
5.30k
    }
761
762
5.66k
    if (!need_more_input_data(state)) {
763
5.66k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.66k
        bool new_eos = false;
765
5.66k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.66k
        if (new_eos) {
767
3.54k
            *eos = true;
768
3.54k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.66k
    }
772
5.65k
    return Status::OK();
773
5.65k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
46.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.9k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.9k
                                                         "AsyncWriterDependency", true);
781
46.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.9k
                             _finish_dependency));
783
784
46.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.9k
    return Status::OK();
787
46.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
353
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
353
    RETURN_IF_ERROR(Base::init(state, info));
779
353
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
353
                                                         "AsyncWriterDependency", true);
781
353
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
353
                             _finish_dependency));
783
784
353
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
353
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
353
    return Status::OK();
787
353
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
46.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.5k
                                                         "AsyncWriterDependency", true);
781
46.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.5k
                             _finish_dependency));
783
784
46.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.5k
    return Status::OK();
787
46.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
32
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
32
    RETURN_IF_ERROR(Base::init(state, info));
779
32
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
32
                                                         "AsyncWriterDependency", true);
781
32
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
32
                             _finish_dependency));
783
784
32
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
32
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
32
    return Status::OK();
787
32
}
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
47.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.3k
    RETURN_IF_ERROR(Base::open(state));
793
47.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
371k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
324k
        RETURN_IF_ERROR(
796
324k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
324k
    }
798
47.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.3k
    return Status::OK();
800
47.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
353
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
353
    RETURN_IF_ERROR(Base::open(state));
793
353
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
353
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
353
    return Status::OK();
800
353
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
46.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.9k
    RETURN_IF_ERROR(Base::open(state));
793
46.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
369k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
322k
        RETURN_IF_ERROR(
796
322k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
322k
    }
798
46.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.9k
    return Status::OK();
800
46.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
32
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
32
    RETURN_IF_ERROR(Base::open(state));
793
32
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
576
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
544
        RETURN_IF_ERROR(
796
544
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
544
    }
798
32
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
32
    return Status::OK();
800
32
}
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.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.3k
    return _writer->sink(block, eos);
806
63.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.38k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.38k
    return _writer->sink(block, eos);
806
1.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
61.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.8k
    return _writer->sink(block, eos);
806
61.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
32
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
32
    return _writer->sink(block, eos);
806
32
}
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
47.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.3k
    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
47.4k
    if (_writer) {
818
47.4k
        Status st = _writer->get_writer_status();
819
47.4k
        if (exec_status.ok()) {
820
47.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.3k
                                                       : Status::Cancelled("force close"));
822
47.3k
        } else {
823
92
            _writer->force_close(exec_status);
824
92
        }
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
47.4k
        RETURN_IF_ERROR(st);
829
47.4k
    }
830
47.3k
    return Base::close(state, exec_status);
831
47.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
339
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
339
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
339
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
339
    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
339
    if (_writer) {
818
339
        Status st = _writer->get_writer_status();
819
339
        if (exec_status.ok()) {
820
339
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
339
                                                       : Status::Cancelled("force close"));
822
339
        } 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
339
        RETURN_IF_ERROR(st);
829
339
    }
830
339
    return Base::close(state, exec_status);
831
339
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
47.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.0k
    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
47.0k
    if (_writer) {
818
47.0k
        Status st = _writer->get_writer_status();
819
47.0k
        if (exec_status.ok()) {
820
46.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.9k
                                                       : Status::Cancelled("force close"));
822
46.9k
        } else {
823
92
            _writer->force_close(exec_status);
824
92
        }
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
47.0k
        RETURN_IF_ERROR(st);
829
47.0k
    }
830
46.9k
    return Base::close(state, exec_status);
831
47.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
32
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
32
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
32
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
32
    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
32
    if (_writer) {
818
32
        Status st = _writer->get_writer_status();
819
32
        if (exec_status.ok()) {
820
32
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
32
                                                       : Status::Cancelled("force close"));
822
32
        } 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
32
        RETURN_IF_ERROR(st);
829
32
    }
830
32
    return Base::close(state, exec_status);
831
32
}
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(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris